diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-19 06:09:05 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-19 06:34:22 -0400 |
commit | cb7b82d452817ea5a1d404d380d5e919bf35fe96 (patch) | |
tree | 6be10819a3ac54e73bb9b6d42edac20cf6414b56 /src/main | |
parent | 89a524678a1b219cf6d91711d7f9b2a56e621cf8 (diff) | |
download | craftbukkit-cb7b82d452817ea5a1d404d380d5e919bf35fe96.tar craftbukkit-cb7b82d452817ea5a1d404d380d5e919bf35fe96.tar.gz craftbukkit-cb7b82d452817ea5a1d404d380d5e919bf35fe96.tar.lz craftbukkit-cb7b82d452817ea5a1d404d380d5e919bf35fe96.tar.xz craftbukkit-cb7b82d452817ea5a1d404d380d5e919bf35fe96.zip |
Added API to allow plugins to set the world's spawn flags.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 0a1c9d30..2695e227 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -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; + } } |