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

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
Bukkit/Spigot 2011-06-19 06:08:43 -04:00
parent 250810823d
commit 797f79e621

View File

@ -618,6 +618,28 @@ public interface World {
*/
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
*/