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, TemplateData<C> data, org.bukkit.inventory.ItemStack defaultBaseItem, String displayName, List<LoreLine> lore, ItemActions actions, ItemConditions conditions, PositionProvider defaultPosition, Map<String, Object> options, Map<String, ContextGroup> contextGroups) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfailsContextClickConditions(C context, ClickTrigger trigger, org.bukkit.entity.Player player, MenuInventory inventory) booleanfailsContextViewConditions(C context, org.bukkit.entity.Player player, MenuInventory inventory) @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 ItemActionsgetContextActions(C context) @Nullable StringgetContextualDisplayName(C context) getContextualLore(C context) @Nullable org.bukkit.inventory.ItemStack@Nullable PositionProvidergetPosition(C context) Methods inherited from class dev.aurelium.slate.item.MenuItem
failsClickConditions, failsConditions, failsViewConditions, getActions, getConditions, getDisplayName, getLore, getName, getOptions
-
Constructor Details
-
TemplateItem
public TemplateItem(Slate slate, String name, Class<C> contextClass, TemplateData<C> data, org.bukkit.inventory.ItemStack defaultBaseItem, String displayName, List<LoreLine> lore, ItemActions actions, ItemConditions conditions, PositionProvider defaultPosition, Map<String, Object> options, Map<String, ContextGroup> contextGroups)
-
-
Method Details
-
getContextClass
-
getPosition
-
getPositionsMap
-
getBaseItems
-
getContextActions
-
getVariants
-
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
-