Runegates and portals now loaded from database.
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
|
||||
package engine.jobs;
|
||||
|
||||
import engine.Enum.RunegateType;
|
||||
import engine.Enum;
|
||||
import engine.Enum.PortalType;
|
||||
import engine.job.AbstractScheduleJob;
|
||||
import engine.objects.Building;
|
||||
import engine.objects.Runegate;
|
||||
@@ -18,9 +19,10 @@ import org.pmw.tinylog.Logger;
|
||||
public class CloseGateJob extends AbstractScheduleJob {
|
||||
|
||||
private final Building building;
|
||||
private final RunegateType portalType;
|
||||
private final Enum.PortalType portalType;
|
||||
|
||||
public CloseGateJob(Building building, PortalType portalType) {
|
||||
|
||||
public CloseGateJob(Building building, RunegateType portalType) {
|
||||
super();
|
||||
this.building = building;
|
||||
this.portalType = portalType;
|
||||
@@ -34,7 +36,7 @@ public class CloseGateJob extends AbstractScheduleJob {
|
||||
return;
|
||||
}
|
||||
|
||||
Runegate.getRunegates()[RunegateType.getGateTypeFromUUID(building.getObjectUUID()).ordinal()].deactivatePortal(portalType);
|
||||
Runegate._runegates.get(building.getObjectUUID()).deactivatePortal(portalType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user