diff --git a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java index aae1c794..ce8770cd 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java @@ -185,14 +185,22 @@ public class MVWorld implements MultiverseWorld { //this.props.validate(); } + /** + * This method is here to provide a stopgap until the add/remove/clear methods are implemented with + * SerializationConfig. + */ + public void validateEntitySpawns() { + setAllowAnimalSpawn(canAnimalsSpawn()); + setAllowMonsterSpawn(canMonstersSpawn()); + } + private void validateProperties() { setPVPMode(isPVPEnabled()); setDifficulty(getDifficulty()); setKeepSpawnInMemory(isKeepingSpawnInMemory()); setScaling(getScaling()); setRespawnToWorld(this.props.getRespawnToWorld()); - setAllowAnimalSpawn(canAnimalsSpawn()); - setAllowMonsterSpawn(canMonstersSpawn()); + validateEntitySpawns(); setGameMode(getGameMode()); } @@ -543,6 +551,7 @@ public class MVWorld implements MultiverseWorld { if (list == null) return false; list.clear(); + validateEntitySpawns(); return true; } @@ -558,6 +567,7 @@ public class MVWorld implements MultiverseWorld { if (list == null) return false; list.add(value); + validateEntitySpawns(); return true; } @@ -573,6 +583,7 @@ public class MVWorld implements MultiverseWorld { if (list == null) return false; list.remove(value); + validateEntitySpawns(); return true; }