Class MenuViewer

java.lang.Object
net.tnemc.menu.core.viewer.MenuViewer

public class MenuViewer extends Object
MenuViewer
Since:
1.5.0.0
Author:
creatorfromhell
  • Field Details

    • data

      private final Map<String,Object> data
    • uuid

      private final UUID uuid
    • page

      private int page
    • chatHandler

      private Predicate<ChatCallback> chatHandler
    • status

      private ViewerStatus status
  • Constructor Details

    • MenuViewer

      public MenuViewer(UUID uuid)
  • Method Details

    • merge

      public void merge(MenuViewer viewer)
      Merges the properties of another MenuViewer into this MenuViewer.
      Parameters:
      viewer - The MenuViewer to merge into this MenuViewer.
    • addData

      public void addData(String identifier, Object data)
    • addInstance

      public void addInstance(String identifier)
    • removeInstances

      public void removeInstances()
    • findData

      public Optional<Object> findData(String identifier)
    • dataOrDefault

      public Object dataOrDefault(String identifier, Object defaultData)
    • close

      public void close(MenuPlayer player)
      Closes the menu for a specific player and removes the associated viewer data.
      Parameters:
      player - The MenuPlayer for whom the menu should be closed.
    • uuid

      public UUID uuid()
    • setMenu

      public void setMenu(String menu)
    • page

      public int page()
    • setPage

      public void setPage(int page)
    • status

      public ViewerStatus status()
    • setStatus

      public void setStatus(ViewerStatus status)
    • chat

      public boolean chat(ChatCallback callback)
    • getChatHandler

      public Predicate<ChatCallback> getChatHandler()
    • setChatHandler

      public void setChatHandler(Predicate<ChatCallback> chatHandler)