Class PlayerInstancePage

java.lang.Object
net.tnemc.menu.core.Page
net.tnemc.menu.core.PlayerInstancePage

public class PlayerInstancePage extends Page
PlayerInstancePage
Since:
1.6.0.0
Author:
creatorfromhell
  • Field Details

  • Constructor Details

    • PlayerInstancePage

      public PlayerInstancePage(int pageNumber)
  • Method Details

    • setRow

      public void setRow(UUID player, int row, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      player - The UUID of the player.
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setRow

      public void setRow(UUID player, int row, int startingColumn, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      player - The UUID of the player.
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      startingColumn - The column to start applying the icons on, inclusive.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setRow

      public void setRow(UUID player, int row, int startingColumn, int endingColumn, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      player - The UUID of the player.
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      startingColumn - The column to start applying the icons on, inclusive.
      endingColumn - The column to stop applying the icons on, inclusive.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setColumn

      public void setColumn(UUID player, int menuRows, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      player - The UUID of the player.
      menuRows - The number of rows that the menu has.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • setColumn

      public void setColumn(UUID player, int menuRows, int startingRow, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      player - The UUID of the player.
      menuRows - The number of rows that the menu has.
      startingRow - The row that the icons should start at, inclusive.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • setColumn

      public void setColumn(UUID player, int menuRows, int startingRow, int endingRow, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      player - The UUID of the player.
      menuRows - The number of rows that the menu has.
      startingRow - The row that the icons should start at, inclusive.
      endingRow - The row that the icons should end at, inclusive.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • onClick

      public boolean onClick(UUID player, MenuClickHandler handler)
      Handles a click action for a specific viewer identified by its UUID.
      Parameters:
      player - The UUID of the player.
      handler - The MenuClickHandler for the click.
      Returns:
      true if the click action is blocked, indicating that it should be prevented, false if the click action is allowed to proceed.
    • addIcon

      public void addIcon(UUID player, Icon icon)
      Adds an icon to the player's instance.
      Parameters:
      player - The UUID of the player.
      icon - The Icon to be added.
    • getIcons

      public Map<Integer,Icon> getIcons(UUID player)
      Retrieves the icons for a given player.
      Parameters:
      player - The UUID of the player.
      Returns:
      A map of icon slots to Icon objects.
    • removeInstance

      public void removeInstance(UUID uuid)
      Removes an instance of PlayerInstance identified by UUID from the players map.
      Parameters:
      uuid - The UUID of the player instance to be removed.