Class TemplateItem<C>

java.lang.Object
dev.aurelium.slate.item.MenuItem
dev.aurelium.slate.item.TemplateItem<C>

public class TemplateItem<C> extends MenuItem
  • Constructor Details

  • Method Details

    • getContextClass

      public Class<C> getContextClass()
    • getPosition

      public PositionProvider getPosition(C context)
    • getPositionsMap

      public Map<C,PositionProvider> getPositionsMap()
    • getBaseItems

      public Map<C,org.bukkit.inventory.ItemStack> getBaseItems()
    • getDefaultBaseItem

      @Nullable public @Nullable org.bukkit.inventory.ItemStack getDefaultBaseItem()
    • getDefaultPosition

      @Nullable public @Nullable SlotPos getDefaultPosition()
    • getContextualDisplayName

      @Nullable public @Nullable String getContextualDisplayName(C context)
    • getActiveDisplayName

      @Nullable public @Nullable String getActiveDisplayName(C context)
      Gets the active display name for the given context. If the context has a contextual display name, it will be returned. Otherwise, the default display name will be returned.
      Parameters:
      context - The context
      Returns:
      The active display name
    • getContextualLore

      @Nullable public @Nullable List<LoreLine> getContextualLore(C context)
    • getActiveLore

      @Nullable public @Nullable List<LoreLine> getActiveLore(C context)
      Gets the active lore for the given context. If the context has contextual lore, it will be returned. Otherwise, the default lore will be returned.
      Parameters:
      context - The context
      Returns:
      The active lore
    • getContextGroups

      public Map<String,ContextGroup> getContextGroups()