diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2011-02-17 14:33:31 +1100 |
---|---|---|
committer | Andrew Ardill <andrew.ardill@gmail.com> | 2011-02-17 18:02:12 +1100 |
commit | 64e82042a61cf6dab6b60b1f584cd91b63dba232 (patch) | |
tree | ae3a278b2c03b5e586beb93a77c05588b1736ed8 /src | |
parent | ac68b8594e82a77f1d98f4c16e0d5a2126f0c47e (diff) | |
download | bukkit-64e82042a61cf6dab6b60b1f584cd91b63dba232.tar bukkit-64e82042a61cf6dab6b60b1f584cd91b63dba232.tar.gz bukkit-64e82042a61cf6dab6b60b1f584cd91b63dba232.tar.lz bukkit-64e82042a61cf6dab6b60b1f584cd91b63dba232.tar.xz bukkit-64e82042a61cf6dab6b60b1f584cd91b63dba232.zip |
Added spawnCreature(Location, CreatureType)
This function will allow spawning of creatures in the world, removing
the need to interface with CraftBukkit directly.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/World.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 252b10c9..df8c7e2a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/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; @@ -238,6 +240,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. * * @return |