Class ModdedConsumable

java.lang.Object
me.mythicalflame.spigotmodding.items.ModdedItem
me.mythicalflame.spigotmodding.items.ModdedConsumable

public abstract class ModdedConsumable extends ModdedItem
This class represents a custom consumable.
  • Constructor Details

    • ModdedConsumable

      public ModdedConsumable(String namespace, String id, org.bukkit.Material material, String name, Integer customModelData, List<String> lore)
      Constructs a ModdedConsumable object.
      Parameters:
      namespace - The non-null namespace that this item belongs to.
      id - The non-null ID of this item.
      material - The non-null consumable Material that this item is based off of.
      name - The nullable display name of this item.
      customModelData - The nullable custom model data value of this item.
      lore - The nullable lore of the item.
      Throws:
      NotConsumableException - If this constructor is called with a non-edible Material.
  • Method Details

    • onConsume

      public void onConsume(org.bukkit.event.player.PlayerItemConsumeEvent event)
      This method is intended to be overridden and is called when a player is involved in a PlayerItemConsumeEvent.
      Parameters:
      event - The PlayerItemConsumeEvent.