From 797f79e621a38c8adeda8e9540b25ec79c6bab27 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 19 Jun 2011 06:08:43 -0400 Subject: [PATCH] Added API to allow plugins to set the world's spawn flags. By: EvilSeph --- paper-api/src/main/java/org/bukkit/World.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index e814fa9400..1970086e02 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -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 */