Class BackConsumable

java.lang.Object
com.storytimeproductions.stweaks.consumables.BackConsumable
All Implemented Interfaces:
ItemConsumable

public class BackConsumable extends Object implements ItemConsumable
Represents a consumable item that allows players to return to a previously teleported region. This item is represented by a paper with a specific model and lore.
  • Constructor Details

    • BackConsumable

      public BackConsumable()
  • Method Details

    • getBaseMaterial

      public org.bukkit.Material getBaseMaterial()
      Returns the base material for this consumable item.
      Specified by:
      getBaseMaterial in interface ItemConsumable
      Returns:
      the base material, which is PAPER for this consumable.
    • getItemModel

      public String getItemModel()
      Returns the unique item model identifier for this consumable.
      Specified by:
      getItemModel in interface ItemConsumable
      Returns:
      a string representing the item model, e.g., "storytime:back"
    • getName

      public net.kyori.adventure.text.Component getName()
      Returns the display name for this consumable item.
      Specified by:
      getName in interface ItemConsumable
      Returns:
      a Component representing the name of the item, e.g., "Back Token".
    • getLore

      public List<net.kyori.adventure.text.Component> getLore()
      Returns the lore for this consumable item.

      context or instructions for the player.

      Specified by:
      getLore in interface ItemConsumable
      Returns:
      a List of Components representing the lore of the item,
    • getCommand

      public String getCommand()
      Returns the command associated with this consumable item.
      Specified by:
      getCommand in interface ItemConsumable
      Returns:
      a string representing the command to execute when this item is used, e.g., "back".
    • getParameterNames

      public List<String> getParameterNames()
      Returns the names of parameters required by the command associated with this consumable.
      Specified by:
      getParameterNames in interface ItemConsumable
      Returns:
      an empty list, as this consumable does not require any parameters.
    • getPermissionNode

      public String getPermissionNode()
      Returns the permission node required to use this consumable item.
      Specified by:
      getPermissionNode in interface ItemConsumable
      Returns:
      a string representing the permission node, or null if no permission