mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
f8ce884be6
commit
40d09ae808
1 changed files with 17 additions and 0 deletions
|
@ -9,6 +9,23 @@ import org.jetbrains.annotations.Nullable;
|
|||
*/
|
||||
public interface EntityEquipment {
|
||||
|
||||
/**
|
||||
* Stores the ItemStack at the given equipment slot in the inventory.
|
||||
*
|
||||
* @param slot the slot to put the ItemStack
|
||||
* @param item the ItemStack to set
|
||||
*/
|
||||
public void setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
* Gets the ItemStack at the given equipment slot in the inventory.
|
||||
*
|
||||
* @param slot the slot to get the ItemStack
|
||||
* @return the ItemStack in the given slot
|
||||
*/
|
||||
@NotNull
|
||||
public ItemStack getItem(@NotNull EquipmentSlot slot);
|
||||
|
||||
/**
|
||||
* Gets a copy of the item the entity is currently holding
|
||||
* in their main hand.
|
||||
|
|
Loading…
Reference in a new issue