Files
prestonbane/src/engine/jobs/CloseGateJob.java
T

47 lines
1.5 KiB
Java
Raw Normal View History

2022-04-30 09:41:17 -04:00
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2022
// www.magicbane.com
2023-07-15 09:23:48 -04:00
package engine.jobs;
2022-04-30 09:41:17 -04:00
import engine.Enum;
import engine.Enum.PortalType;
2022-04-30 09:41:17 -04:00
import engine.job.AbstractScheduleJob;
import engine.objects.Building;
import engine.objects.Runegate;
import org.pmw.tinylog.Logger;
2023-07-15 09:23:48 -04:00
2022-04-30 09:41:17 -04:00
public class CloseGateJob extends AbstractScheduleJob {
2023-07-15 09:23:48 -04:00
private final Building building;
private final Enum.PortalType portalType;
public CloseGateJob(Building building, PortalType portalType) {
2023-07-15 09:23:48 -04:00
super();
this.building = building;
this.portalType = portalType;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
@Override
protected void doJob() {
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
if (building == null) {
Logger.error("Rungate building was null");
return;
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
Runegate._runegates.get(building.getObjectUUID()).deactivatePortal(portalType);
}
2022-04-30 09:41:17 -04:00
2023-07-15 09:23:48 -04:00
@Override
protected void _cancelJob() {
}
2022-04-30 09:41:17 -04:00
}