mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
This commit is contained in:
parent
529a9a694d
commit
e4f46260b9
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…
Add table
Reference in a new issue