Class ChestMenu


public class ChestMenu extends AbstractContainerMenu
  • Field Details

    • container

      private final Container container
    • containerRows

      private final int containerRows
  • Constructor Details

    • ChestMenu

      private ChestMenu(MenuType<?> pType, int pContainerId, Inventory pPlayerInventory, int pRows)
    • ChestMenu

      public ChestMenu(MenuType<?> pType, int pContainerId, Inventory pPlayerInventory, Container pContainer, int pRows)
  • Method Details

    • oneRow

      public static ChestMenu oneRow(int pContainerId, Inventory pPlayerInventory)
    • twoRows

      public static ChestMenu twoRows(int pContainerId, Inventory pPlayerInventory)
    • threeRows

      public static ChestMenu threeRows(int pContainerId, Inventory pPlayerInventory)
    • fourRows

      public static ChestMenu fourRows(int pContainerId, Inventory pPlayerInventory)
    • fiveRows

      public static ChestMenu fiveRows(int pContainerId, Inventory pPlayerInventory)
    • sixRows

      public static ChestMenu sixRows(int pContainerId, Inventory pPlayerInventory)
    • threeRows

      public static ChestMenu threeRows(int pContainerId, Inventory pPlayerInventory, Container pContainer)
    • sixRows

      public static ChestMenu sixRows(int pContainerId, Inventory pPlayerInventory, Container pContainer)
    • addChestGrid

      private void addChestGrid(Container pContainer, int pX, int pY)
    • stillValid

      public boolean stillValid(Player pPlayer)
      Determines whether supplied player can use this container
      Specified by:
      stillValid in class AbstractContainerMenu
    • quickMoveStack

      public ItemStack quickMoveStack(Player pPlayer, int pIndex)
      Handle when the stack in slot index is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).
      Specified by:
      quickMoveStack in class AbstractContainerMenu
    • removed

      public void removed(Player pPlayer)
      Called when the container is closed.
      Overrides:
      removed in class AbstractContainerMenu
    • getContainer

      public Container getContainer()
    • getRowCount

      public int getRowCount()