Class StandardLootItem
java.lang.Object
com.ryandw11.structure.loottables.StandardLootItem
- All Implemented Interfaces:
LootItem
Represents a Standard Item within a
ConfigLootTable
.-
Constructor Summary
ConstructorsConstructorDescriptionStandardLootItem(String customName, String material, int amount, int weight, List<String> lore, Map<String,String> enchants)
This is for normal loot table items.StandardLootItem(String customName, String material, String amount, int weight, List<String> lore, Map<String,String> enchants)
This is for normal loot table items. -
Method Summary
-
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 interfaceLootItem
- 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.
-