Package dev.aurelium.slate.item
Class TemplateItem<C>
java.lang.Object
dev.aurelium.slate.item.MenuItem
dev.aurelium.slate.item.TemplateItem<C>
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateItem(Slate slate, String name, Class<C> contextClass, Map<C, org.bukkit.inventory.ItemStack> baseItems, org.bukkit.inventory.ItemStack defaultBaseItem, String displayName, List<LoreLine> lore, Map<C, String> contextualDisplayNames, Map<C, List<LoreLine>> contextualLore, Map<ClickAction, List<Action>> actions, Map<C, PositionProvider> positions, SlotPos defaultPosition, Map<String, Object> options, Map<String, ContextGroup> contextGroups) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringgetActiveDisplayName(C context) Gets the active display name for the given context.getActiveLore(C context) Gets the active lore for the given context.@Nullable StringgetContextualDisplayName(C context) getContextualLore(C context) @Nullable org.bukkit.inventory.ItemStack@Nullable SlotPosgetPosition(C context) Methods inherited from class dev.aurelium.slate.item.MenuItem
getActions, getDisplayName, getLore, getName, getOptions
-
Constructor Details
-
TemplateItem
public TemplateItem(Slate slate, String name, Class<C> contextClass, Map<C, org.bukkit.inventory.ItemStack> baseItems, org.bukkit.inventory.ItemStack defaultBaseItem, String displayName, List<LoreLine> lore, Map<C, String> contextualDisplayNames, Map<C, List<LoreLine>> contextualLore, Map<ClickAction, List<Action>> actions, Map<C, PositionProvider> positions, SlotPos defaultPosition, Map<String, Object> options, Map<String, ContextGroup> contextGroups)
-
-
Method Details
-
getContextClass
-
getPosition
-
getPositionsMap
-
getBaseItems
-
getDefaultBaseItem
@Nullable public @Nullable org.bukkit.inventory.ItemStack getDefaultBaseItem() -
getDefaultPosition
-
getContextualDisplayName
-
getActiveDisplayName
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
-
getActiveLore
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
-