Interface ItemConsumable
- All Known Implementing Classes:
AnvilConsumable, BackConsumable, BoostConsumable, EnderchestConsumable, EntitySizeConsumable, NickConsumable, PlayerSizeConsumable, SetWarpConsumable, SmithingTableConsumable, WorkbenchConsumable
public interface ItemConsumable
Represents a consumable item in the game that can be used by players.
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.MaterialReturns the base material for this consumable item.Returns the command associated with this consumable item.Returns the unique item model identifier for this consumable.List<net.kyori.adventure.text.Component> getLore()Returns the lore for this consumable item.net.kyori.adventure.text.ComponentgetName()Returns the display name for this consumable item.Returns a list of parameter names required for the command associated with this consumable.Returns a list of parameter types for each parameter name.Returns the permission node required to use this consumable item.
-
Method Details
-
getBaseMaterial
org.bukkit.Material getBaseMaterial()Returns the base material for this consumable item.- Returns:
- the base material, e.g., Material.PAPER for a paper item.
-
getItemModel
String getItemModel()Returns the unique item model identifier for this consumable.- Returns:
- a string representing the item model, e.g., "storytime:back_token".
-
getName
net.kyori.adventure.text.Component getName()Returns the display name for this consumable item.- Returns:
- a Component representing the name of the item, e.g., "Back Token".
-
getLore
List<net.kyori.adventure.text.Component> getLore()Returns the lore for this consumable item.- Returns:
- a List of Components representing the lore of the item,
-
getCommand
String getCommand()Returns the command associated with this consumable item.- Returns:
- a string representing the command to execute when this item is used, e.g., "back".
-
getParameterNames
-
getPermissionNode
String getPermissionNode()Returns the permission node required to use this consumable item.- Returns:
- a string representing the permission node, or null if no
-
getParameterTypes
Returns a list of parameter types for each parameter name. Each value should be one of: "numeric", "alpha", or "alphanumeric" (default if not specified). The list must be the same length as getParameterNames().- Returns:
- a List of strings representing the type for each parameter.
-