This commit is contained in:
Jesse Boyd 2016-11-30 15:41:08 +11:00
parent 5642fd3899
commit 93414d54c1
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -23,6 +23,9 @@ public class EntitySpawnListener implements Listener {
} }
Plot plot = area.getOwnedPlotAbs(location); Plot plot = area.getOwnedPlotAbs(location);
if (plot == null) { if (plot == null) {
if (!area.MOB_SPAWNING) {
event.setCancelled(true);
}
return; return;
} }
if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) { if (Settings.Done.RESTRICT_BUILDING && plot.hasFlag(Flags.DONE)) {
@ -30,12 +33,6 @@ public class EntitySpawnListener implements Listener {
} }
switch (entity.getType()) { switch (entity.getType()) {
case ENDER_CRYSTAL: case ENDER_CRYSTAL:
if (plot == null) {
if (!area.MOB_SPAWNING) {
event.setCancelled(true);
}
return;
}
if (PlayerEvents.checkEntity(entity, plot)) { if (PlayerEvents.checkEntity(entity, plot)) {
event.setCancelled(true); event.setCancelled(true);
} }