mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 04:28:21 +01:00
Added isHand and isArmor to EquipmentSlot
This commit is contained in:
parent
29b0f5448d
commit
92d97c624f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user