Added ItemDrop, world.dropItem(), and world.dropItemNaturally().

This commit is contained in:
sk89q
2011-01-08 12:47:48 -08:00
parent 61e9e645e8
commit a9927b4efb
2 changed files with 33 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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.
*