Added isHand and isArmor to EquipmentSlot

This commit is contained in:
Arne Dalhuisen 2021-05-11 14:12:19 +02:00
parent 29b0f5448d
commit 92d97c624f

View File

@ -12,6 +12,14 @@ public enum EquipmentSlot {
CHESTPLATE,
HELMET;
public boolean isHand() {
return this == MAIN_HAND || this == OFF_HAND;
}
public boolean isArmor() {
return !isHand();
}
@NotNull
public static EquipmentSlot fromArmorSlot(ArmorEquipEvent.ArmorSlot armorSlot) {
switch (armorSlot) {