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

By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-01-08 12:47:48 -08:00
parent 75aa4ef4c5
commit 1105de519d
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.
*