#1671 Fixed lists changing not forcing validation of the elements
This commit is contained in:
parent
648365f336
commit
bd1d852393
|
@ -185,14 +185,22 @@ public class MVWorld implements MultiverseWorld {
|
||||||
//this.props.validate();
|
//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() {
|
private void validateProperties() {
|
||||||
setPVPMode(isPVPEnabled());
|
setPVPMode(isPVPEnabled());
|
||||||
setDifficulty(getDifficulty());
|
setDifficulty(getDifficulty());
|
||||||
setKeepSpawnInMemory(isKeepingSpawnInMemory());
|
setKeepSpawnInMemory(isKeepingSpawnInMemory());
|
||||||
setScaling(getScaling());
|
setScaling(getScaling());
|
||||||
setRespawnToWorld(this.props.getRespawnToWorld());
|
setRespawnToWorld(this.props.getRespawnToWorld());
|
||||||
setAllowAnimalSpawn(canAnimalsSpawn());
|
validateEntitySpawns();
|
||||||
setAllowMonsterSpawn(canMonstersSpawn());
|
|
||||||
setGameMode(getGameMode());
|
setGameMode(getGameMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,6 +551,7 @@ public class MVWorld implements MultiverseWorld {
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return false;
|
return false;
|
||||||
list.clear();
|
list.clear();
|
||||||
|
validateEntitySpawns();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,6 +567,7 @@ public class MVWorld implements MultiverseWorld {
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return false;
|
return false;
|
||||||
list.add(value);
|
list.add(value);
|
||||||
|
validateEntitySpawns();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,6 +583,7 @@ public class MVWorld implements MultiverseWorld {
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return false;
|
return false;
|
||||||
list.remove(value);
|
list.remove(value);
|
||||||
|
validateEntitySpawns();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue