Class StandardLootItem

java.lang.Object
com.ryandw11.structure.loottables.StandardLootItem
All Implemented Interfaces:
LootItem

public class StandardLootItem extends Object implements LootItem
Represents a Standard Item within a ConfigLootTable.
  • Constructor Details

    • StandardLootItem

      public StandardLootItem(String customName, String material, int amount, int weight, List<String> lore, Map<String,​String> enchants)
      This is for normal loot table items.
      Parameters:
      customName - The custom name.
      material - The material of the item.
      amount - The amount.
      weight - The weight.
      lore - The lore.
      enchants - The enchants.
    • StandardLootItem

      public StandardLootItem(String customName, String material, String amount, int weight, List<String> lore, Map<String,​String> enchants)
      This is for normal loot table items.
      Parameters:
      customName - The custom name.
      material - The material of the item.
      amount - The amount (in stylized form).
      weight - The weight.
      lore - The lore.
      enchants - The enchants.
  • Method Details

    • getWeight

      public int getWeight()
      Get the weight of the loot item.
      Returns:
      The weight of the loot item.
    • setWeight

      public void setWeight(int weight)
      Set the weight of the loot item.
      Parameters:
      weight - The weight of the loot item to set.
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack()
      Get the item stack.
      Specified by:
      getItemStack in interface LootItem
      Returns:
      The clone of the item stack with the applied stats.
    • setItem

      public void setItem(org.bukkit.inventory.ItemStack item)
      Set the base item stack.
      Parameters:
      item - The item to set the loot item to.