Class PlayerInventory

java.lang.Object
fr.fidorial.inventory.PlayerInventory
All Implemented Interfaces:
Container

public class PlayerInventory extends Object implements Container
  • Field Details

  • Constructor Details

    • PlayerInventory

      public PlayerInventory()
  • Method Details

    • size

      public int size()
      Description copied from interface: Container
      Number of slots exposed by this container.
      Specified by:
      size in interface Container
    • get

      public ItemStack get(int slot)
      Description copied from interface: Container
      Returns the contents of the requested slot, never null.
      Specified by:
      get in interface Container
    • set

      public void set(int slot, @Nullable ItemStack stack)
      Description copied from interface: Container
      Replaces the contents of a slot. A null is normalized to ItemStack.EMPTY.
      Specified by:
      set in interface Container
    • clear

      public void clear()
      Description copied from interface: Container
      Clears every slot.
      Specified by:
      clear in interface Container
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Container
      true if every slot is empty.
      Specified by:
      isEmpty in interface Container
    • getAllItems

      public ItemStack[] getAllItems()
    • setAllItems

      public void setAllItems(ItemStack @Nullable [] contents)