geforkt von Mirrors/Paper
#496: Add methods to get/set ItemStacks in EquipmentSlots
By: Parker Hawke <hawkeboyz2@hotmail.com>
Dieser Commit ist enthalten in:
Ursprung
8d4eeb1b3d
Commit
b9bbaa2a71
@ -89,6 +89,26 @@ public interface PlayerInventory extends Inventory {
|
||||
@Override
|
||||
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
|
||||
*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren