Invert spawn settings

This commit is contained in:
boy0001 2015-02-27 12:27:32 +11:00
parent c2d932db85
commit 085eccb10f

View File

@ -592,13 +592,13 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
} }
final PlotWorld pW = PlotSquared.getPlotWorld(world); final PlotWorld pW = PlotSquared.getPlotWorld(world);
final CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason(); final CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
if ((reason == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG) && pW.SPAWN_EGGS) { if ((reason == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG) && !pW.SPAWN_EGGS) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} else if ((reason == CreatureSpawnEvent.SpawnReason.BREEDING) && pW.SPAWN_BREEDING) { } else if ((reason == CreatureSpawnEvent.SpawnReason.BREEDING) && !pW.SPAWN_BREEDING) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} else if ((reason == CreatureSpawnEvent.SpawnReason.CUSTOM) && pW.SPAWN_CUSTOM && !(event.getEntityType().getTypeId() == 30)) { } else if ((reason == CreatureSpawnEvent.SpawnReason.CUSTOM) && !pW.SPAWN_CUSTOM && !(event.getEntityType().getTypeId() == 30)) {
event.setCancelled(true); event.setCancelled(true);
return; return;
} }