Added API to allow plugins to set the world's spawn flags.

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
CraftBukkit/Spigot 2011-06-19 06:09:05 -04:00
parent ef3aaa62f3
commit e144eddaf2

View file

@ -765,4 +765,16 @@ public class CraftWorld implements World {
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain) {
return CraftChunk.getEmptyChunkSnapshot(x, z, this, includeBiome, includeBiomeTempRain);
}
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals) {
world.setSpawnFlags(allowMonsters, allowAnimals);
}
public boolean getAllowAnimals() {
return world.allowAnimals;
}
public boolean getAllowMonsters() {
return world.allowMonsters;
}
}