diff options
Diffstat (limited to 'src/main')
-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 |