mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-31 21:48:08 +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,
|
CHESTPLATE,
|
||||||
HELMET;
|
HELMET;
|
||||||
|
|
||||||
|
public boolean isHand() {
|
||||||
|
return this == MAIN_HAND || this == OFF_HAND;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isArmor() {
|
||||||
|
return !isHand();
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static EquipmentSlot fromArmorSlot(ArmorEquipEvent.ArmorSlot armorSlot) {
|
public static EquipmentSlot fromArmorSlot(ArmorEquipEvent.ArmorSlot armorSlot) {
|
||||||
switch (armorSlot) {
|
switch (armorSlot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user