From eb206f49c16c18d903111d2e15f87c5402db29b0 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 17 Feb 2011 14:33:31 +1100 Subject: [PATCH] Added spawnCreature(Location, CreatureType) This function will allow spawning of creatures in the world, removing the need to interface with CraftBukkit directly. By: Andrew Ardill --- paper-api/src/main/java/org/bukkit/World.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 252b10c9c0..df8c7e2a3a 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -5,6 +5,8 @@ import java.util.List; import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; +import org.bukkit.entity.Creature; +import org.bukkit.entity.CreatureType; import org.bukkit.entity.Entity; import org.bukkit.entity.ItemDrop; import org.bukkit.entity.LivingEntity; @@ -237,6 +239,16 @@ public interface World { */ public Boat spawnBoat(Location loc); + /** + * Spawn a creature at the given location. + * + * @param loc The location to spawn at. + * @param creatureType The creature to spawn. + * + * @return The Creature if it was spawned, null otherwise. + */ + public Creature spawnCreature(Location loc, CreatureType creatureType); + /** * Get a list of all entities. *