mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Prepare for 1.20.3 dev
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: SoSeDiK <mrsosedik@gmail.com>
|
||||
Date: Sun, 16 Oct 2022 15:28:49 +0300
|
||||
Subject: [PATCH] Add EquipmentSlot convenience methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlot.java b/src/main/java/org/bukkit/inventory/EquipmentSlot.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/EquipmentSlot.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/EquipmentSlot.java
|
||||
@@ -0,0 +0,0 @@ public enum EquipmentSlot {
|
||||
LEGS,
|
||||
CHEST,
|
||||
HEAD
|
||||
+ // Paper start
|
||||
+ ;
|
||||
+ /**
|
||||
+ * Checks whether this equipment slot is a hand:
|
||||
+ * either {@link #HAND} or {@link #OFF_HAND}
|
||||
+ *
|
||||
+ * @return whether this is a hand slot
|
||||
+ */
|
||||
+ public boolean isHand() {
|
||||
+ return this == HAND || this == OFF_HAND;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks whether this equipment slot
|
||||
+ * is one of the armor slots:
|
||||
+ * {@link #HEAD}, {@link #CHEST},
|
||||
+ * {@link #LEGS}, or {@link #FEET}
|
||||
+ *
|
||||
+ * @return whether this is an armor slot
|
||||
+ */
|
||||
+ public boolean isArmor() {
|
||||
+ return this == HEAD || this == CHEST || this == LEGS || this == FEET;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
Reference in New Issue
Block a user