summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsunkid <sunkid@iminurnetz.com>2011-06-08 15:50:22 -0700
committerEvilSeph <evilseph@unaligned.org>2011-06-17 01:57:12 -0400
commitad19b8736ba98d957c52cd5afd5c51eeeca9f35e (patch)
tree0f33aa1d0554a8cfdcb3bd8945bfe743dd675894 /src
parent91ae9cbf9243ed20bfc4e7a9867ace313c5394f2 (diff)
downloadbukkit-ad19b8736ba98d957c52cd5afd5c51eeeca9f35e.tar
bukkit-ad19b8736ba98d957c52cd5afd5c51eeeca9f35e.tar.gz
bukkit-ad19b8736ba98d957c52cd5afd5c51eeeca9f35e.tar.lz
bukkit-ad19b8736ba98d957c52cd5afd5c51eeeca9f35e.tar.xz
bukkit-ad19b8736ba98d957c52cd5afd5c51eeeca9f35e.zip
Added a general spawn method.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/World.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 99098d9b..d979d643 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -275,7 +275,9 @@ public interface World {
*
* @param location Location to spawn the minecart
* @return Minecart created as a result of this method
+ * @deprecated use {@link #spawn(Location, Class)} instead
*/
+ @Deprecated
public Minecart spawnMinecart(Location location);
/**
@@ -283,7 +285,9 @@ public interface World {
*
* @param loc Location to spawn the minecart
* @return StorageMinecart created as a result of this method
+ * @deprecated use {@link #spawn(Location, Class)} instead
*/
+ @Deprecated
public StorageMinecart spawnStorageMinecart(Location loc);
/**
@@ -291,7 +295,9 @@ public interface World {
*
* @param loc Location to spawn the minecart
* @return PoweredMinecart created as a result of this method
+ * @deprecated use {@link #spawn(Location, Class)} instead
*/
+ @Deprecated
public PoweredMinecart spawnPoweredMinecart(Location loc);
/**
@@ -299,7 +305,9 @@ public interface World {
*
* @param loc Location to spawn the boat
* @return Boat created as a result of this method
+ * @deprecated use {@link #spawn(Location, Class)} instead
*/
+ @Deprecated
public Boat spawnBoat(Location loc);
/**
@@ -572,6 +580,16 @@ public interface World {
public List<BlockPopulator> getPopulators();
/**
+ * Spawn an entity of a specific class at the given {@link Location}
+ *
+ * @param location the {@link Location} to spawn the entity at
+ * @param clazz the class of the {@link Entity} to spawn
+ * @return an instance of the spawned {@link Entity}
+ * @throws an {@link IllegalArgumentException} if either parameter is null or the {@link Entity} requested cannot be spawned
+ */
+ public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException;
+
+ /**
* Plays an effect to all players within a default radius around a given location.
*
* @param location the {@link Location} around which players must be to hear the sound