Class ActiveMenu

java.lang.Object
dev.aurelium.slate.menu.ActiveMenu
Direct Known Subclasses:
EmptyActiveMenu

public class ActiveMenu extends Object
  • Constructor Details

  • Method Details

    • empty

      public static ActiveMenu empty(Slate slate, org.bukkit.entity.Player player)
    • getName

      public String getName()
    • setHidden

      public void setHidden(String itemName, boolean hidden)
      Hides or shows an item in the current menu, will not delete the item in configs. Will not take effect unless the menu is reloaded.
      Parameters:
      itemName - The name of the item to hide
    • getCurrentPage

      public int getCurrentPage()
      Gets the current page of the menu, 0 is the first page
      Returns:
      The current page number, 0 if there is no pagination set up
    • getTotalPages

      public int getTotalPages()
      Gets the total number of pages in the menu
      Returns:
      The total number of pages, 1 if there is no pagination set up
    • getProperty

      public Object getProperty(String name)
    • getProperty

      public Object getProperty(String name, Object def)
    • getProperties

      public Map<String,Object> getProperties()
    • setProperty

      public void setProperty(String name, Object value)
    • reload

      public void reload()
    • setCooldown

      public void setCooldown(String itemName, int cooldown)
    • getOption

      @Nullable public @Nullable Object getOption(String key)
    • getOption

      @Nullable public <T> T getOption(Class<T> clazz, String key)
    • getOption

      public Object getOption(String key, Object def)
    • getOption

      public <T> T getOption(Class<T> clazz, String key, T def)
    • getItemOption

      @Nullable public @Nullable Object getItemOption(String itemName, String key)
    • getItemOption

      public Object getItemOption(String itemName, String key, Object def)
    • getComponents

      public Map<String,MenuComponent> getComponents()
    • getFormats

      public Map<String,String> getFormats()
    • getFormat

      @NotNull public @NotNull String getFormat(String key)
      Gets a format from the menu's formats, returns the key if the format does not exist
      Parameters:
      key - The key of the format
      Returns:
      The format, or the key if the format does not exist
    • setPositionProvider

      public <T> void setPositionProvider(String templateName, T context, PositionProvider provider)
    • getContextGroups

      public Map<String,ContextGroup> getContextGroups(String templateName)