mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Added ItemDrop, world.dropItem(), and world.dropItemNaturally().
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
75aa4ef4c5
commit
1105de519d
2 changed files with 33 additions and 0 deletions
15
paper-api/src/main/java/org/bukkit/ItemDrop.java
Normal file
15
paper-api/src/main/java/org/bukkit/ItemDrop.java
Normal 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();
|
||||||
|
}
|
|
@ -52,6 +52,24 @@ public interface World {
|
||||||
*/
|
*/
|
||||||
public boolean isChunkLoaded(Chunk chunk);
|
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.
|
* Spawns an arrow.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue