mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
#496: Add methods to get/set ItemStacks in EquipmentSlots
This commit is contained in:
parent
3abebc9fbf
commit
da9ef3c55f
1 changed files with 20 additions and 0 deletions
|
@ -89,6 +89,26 @@ public interface PlayerInventory extends Inventory {
|
||||||
@Override
|
@Override
|
||||||
public void setItem(int index, @Nullable ItemStack item);
|
public void setItem(int index, @Nullable ItemStack item);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* @see #setItem(int, ItemStack)
|
||||||
|
*/
|
||||||
|
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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put the given ItemStacks into the armor slots
|
* Put the given ItemStacks into the armor slots
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue