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

This commit is contained in:
EvilSeph 2011-06-19 06:08:43 -04:00
parent 39dc703007
commit 3b7f86ba5b

View File

@ -618,6 +618,28 @@ public interface World {
*/ */
public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain); public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain);
/**
* Sets the spawn flags for this.
*
* @param allowMonsters - if true, monsters are allowed to spawn in this world.
* @param allowAnimals - if true, animals are allowed to spawn in this world.
*/
public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals);
/**
* Gets whether animals can spawn in this world.
*
* @return whether animals can spawn in this world.
*/
public boolean getAllowAnimals();
/**
* Gets whether monsters can spawn in this world.
*
* @return whether monsters can spawn in this world.
*/
public boolean getAllowMonsters();
/** /**
* Represents various map environment types that a world may be * Represents various map environment types that a world may be
*/ */