public class WauzEquipment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ArmorCategory |
category
The armor category of the equipment.
|
private int |
durabilityStat
The durability stat value of the equipment.
|
private org.bukkit.Color |
leatherDye
The leather color of the equipment.
|
private double |
mainStat
The main stat value of the equipment.
|
private org.bukkit.Material |
material
The material of the equipment.
|
private java.lang.String |
name
The name of the equipment.
|
private double |
speedStat
The speed stat value of the equipment.
|
private int |
swiftnessStat
The swiftness stat value of the equipment.
|
private EquipmentType |
type
The general type of the equipment.
|
Constructor and Description |
---|
WauzEquipment(EquipmentType type,
org.bukkit.Material material,
java.lang.String name)
Creates a new base equipment type.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
clearAllSockets(org.bukkit.event.inventory.InventoryClickEvent event)
Tries to remove all runes and gems from a piece of equipment.
|
private static boolean |
doesClassMatch(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack armorItemStack)
Checks if the player has the right class to equip an item.
|
private static boolean |
doesLevelMatch(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack armorItemStack)
Checks if the player has the right level to equip an item.
|
static void |
equipArmor(ArmorEquipEvent event)
Equips a fitting cosmetic set of armor, when the chestplate changed.
|
static void |
equipArmor(org.bukkit.entity.Player player,
org.bukkit.inventory.ItemStack armorItemStack)
Equips a fitting cosmetic set of armor for the given chestplate.
|
ArmorCategory |
getCategory() |
static org.bukkit.inventory.ItemStack |
getCosmeticItem(org.bukkit.Material material)
Gets a cosmetic item with given material.
|
static org.bukkit.inventory.ItemStack |
getCosmeticItem(org.bukkit.Material material,
org.bukkit.Color color)
Gets a cosmetic item with given material and color.
|
int |
getDurabilityStat() |
org.bukkit.Color |
getLeatherDye() |
double |
getMainStat() |
org.bukkit.Material |
getMaterial() |
java.lang.String |
getName() |
double |
getSpeedStat() |
int |
getSwiftnessStat() |
EquipmentType |
getType() |
static void |
init()
Initializes all equipment base types and registers them.
|
static boolean |
insertRune(org.bukkit.event.inventory.InventoryClickEvent event)
Tries to insert a rune into a piece of equipment.
|
static boolean |
insertSkillgem(org.bukkit.event.inventory.InventoryClickEvent event)
Tries to insert a skillgem into a piece of equipment.
|
WauzEquipment |
withCategory(ArmorCategory category) |
WauzEquipment |
withDurabilityStat(int durabilityStat) |
WauzEquipment |
withLeatherDye(org.bukkit.Color leatherDye) |
WauzEquipment |
withMainStat(double mainStat) |
WauzEquipment |
withSpeedStat(double speedStat) |
WauzEquipment |
withSwiftnessStat(int swiftnessStat) |
private EquipmentType type
private org.bukkit.Material material
private java.lang.String name
private double mainStat
private double speedStat
private int swiftnessStat
private int durabilityStat
private ArmorCategory category
private org.bukkit.Color leatherDye
public WauzEquipment(EquipmentType type, org.bukkit.Material material, java.lang.String name)
type
- The general type of the equipment.material
- The material of the equipment.name
- The name of the equipment.public static void init()
public static void equipArmor(ArmorEquipEvent event)
event
- The armor equip event.doesLevelMatch(Player, ItemStack)
,
doesClassMatch(Player, ItemStack)
,
equipArmor(Player, ItemStack)
public static void equipArmor(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack armorItemStack)
player
- The player to who equipped the chestplate.armorItemStack
- The equipped chestplate.private static boolean doesLevelMatch(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack armorItemStack)
player
- The player to check.armorItemStack
- The item, that the player wants to equip.private static boolean doesClassMatch(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack armorItemStack)
player
- The player to check.armorItemStack
- The item, that the player wants to equip.public static org.bukkit.inventory.ItemStack getCosmeticItem(org.bukkit.Material material)
material
- The material of the item.public static org.bukkit.inventory.ItemStack getCosmeticItem(org.bukkit.Material material, org.bukkit.Color color)
material
- The material of the item.color
- The color of the leather dye.public static boolean insertRune(org.bukkit.event.inventory.InventoryClickEvent event)
event
- The inventory event.WauzRuneInserter.insertRune(Player, ItemStack, ItemStack)
public static boolean insertSkillgem(org.bukkit.event.inventory.InventoryClickEvent event)
event
- The inventory event.WauzSkillgemInserter.insertSkillgem(Player, ItemStack, ItemStack)
public static boolean clearAllSockets(org.bukkit.event.inventory.InventoryClickEvent event)
event
- The inventory event.WauzRuneRemover.clearAllSockets(Player, ItemStack)
public EquipmentType getType()
public org.bukkit.Material getMaterial()
public java.lang.String getName()
public double getMainStat()
public WauzEquipment withMainStat(double mainStat)
mainStat
- The new main stat value of the equipment.public double getSpeedStat()
public WauzEquipment withSpeedStat(double speedStat)
speedStat
- The new speed stat value of the equipment.public int getSwiftnessStat()
public WauzEquipment withSwiftnessStat(int swiftnessStat)
swiftnessStat
- The new swiftness stat value of the equipment.public int getDurabilityStat()
public WauzEquipment withDurabilityStat(int durabilityStat)
durabilityStat
- The new durability stat value of the equipment.public ArmorCategory getCategory()
public WauzEquipment withCategory(ArmorCategory category)
category
- The new armor category of the equipment.public org.bukkit.Color getLeatherDye()
public WauzEquipment withLeatherDye(org.bukkit.Color leatherDye)
leatherDye
- The new leather color of the equipment.