diff --git a/paper-api/src/main/java/org/bukkit/ItemDrop.java b/paper-api/src/main/java/org/bukkit/ItemDrop.java new file mode 100644 index 0000000000..3e2fd59881 --- /dev/null +++ b/paper-api/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/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 422263989b..bbf31035ca 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -52,6 +52,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. *