diff options
author | sk89q <the.sk89q@gmail.com> | 2011-01-08 12:47:48 -0800 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-01-08 12:47:48 -0800 |
commit | 327142ef52ee5c3a22a55c3439c66e90487da04a (patch) | |
tree | a9d8288bbc2871b7b0bf3789e9b46498687a3095 | |
parent | 3b1f74e6c5bf1d325e10f263441f54ca08ad6522 (diff) | |
download | bukkit-327142ef52ee5c3a22a55c3439c66e90487da04a.tar bukkit-327142ef52ee5c3a22a55c3439c66e90487da04a.tar.gz bukkit-327142ef52ee5c3a22a55c3439c66e90487da04a.tar.lz bukkit-327142ef52ee5c3a22a55c3439c66e90487da04a.tar.xz bukkit-327142ef52ee5c3a22a55c3439c66e90487da04a.zip |
Added ItemDrop, world.dropItem(), and world.dropItemNaturally().
-rw-r--r-- | src/main/java/org/bukkit/ItemDrop.java | 15 | ||||
-rw-r--r-- | src/main/java/org/bukkit/World.java | 18 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/ItemDrop.java b/src/main/java/org/bukkit/ItemDrop.java new file mode 100644 index 00000000..3e2fd598 --- /dev/null +++ b/src/main/java/org/bukkit/ItemDrop.java @@ -0,0 +1,15 @@ +package org.bukkit;
+
+/**
+ * Represents a dropped item.
+ *
+ * @author sk89q
+ */
+public interface ItemDrop extends Entity {
+ /**
+ * Gets the item stack.
+ *
+ * @return
+ */
+ public ItemStack getItemStack();
+}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 42226398..bbf31035 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -53,6 +53,24 @@ public interface World { public boolean isChunkLoaded(Chunk chunk); /** + * Drop an item exactly at the specified location. + * + * @param loc + * @param item + * @return dropped item entity + */ + public ItemDrop dropItem(Location loc, ItemStack item); + + /** + * Drop an item as if it was mined (randomly placed). + * + * @param loc + * @param item + * @return dropped item entity + */ + public ItemDrop dropItemNaturally(Location loc, ItemStack item); + + /** * Spawns an arrow. * * @param loc |