aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0478-Fix-equipment-slot-and-group-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0478-Fix-equipment-slot-and-group-API.patch')
-rw-r--r--patches/api/0478-Fix-equipment-slot-and-group-API.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/api/0478-Fix-equipment-slot-and-group-API.patch b/patches/api/0478-Fix-equipment-slot-and-group-API.patch
new file mode 100644
index 0000000000..e743118494
--- /dev/null
+++ b/patches/api/0478-Fix-equipment-slot-and-group-API.patch
@@ -0,0 +1,31 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Wed, 22 May 2024 10:00:19 -0700
+Subject: [PATCH] Fix equipment slot and group API
+
+was missing the 'body' slot group
+
+diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
+index 8ba00f743b61cd33dd41ae7f1c272ee2b0c8546d..7cc1fd241e1f62a9fe9b5849110c0a3d05d08034 100644
+--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
++++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
+@@ -95,6 +95,7 @@ public class AttributeModifier implements ConfigurationSerializable {
+ */
+ @Nullable
+ @Deprecated
++ @io.papermc.paper.annotation.DoNotUse // Paper
+ public EquipmentSlot getSlot() {
+ return slot == EquipmentSlotGroup.ANY ? null : slot.getExample();
+ }
+diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java b/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
+index 82416a078f697f627916c578e6c2dbc003519acf..f72aa9cfd2d1472cf26600ac0f2380660069407d 100644
+--- a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
++++ b/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
+@@ -25,6 +25,7 @@ public final class EquipmentSlotGroup implements Predicate<EquipmentSlot> {
+ public static final EquipmentSlotGroup CHEST = get("chest", EquipmentSlot.CHEST);
+ public static final EquipmentSlotGroup HEAD = get("head", EquipmentSlot.HEAD);
+ public static final EquipmentSlotGroup ARMOR = get("armor", (test) -> test == EquipmentSlot.FEET || test == EquipmentSlot.LEGS || test == EquipmentSlot.CHEST || test == EquipmentSlot.HEAD, EquipmentSlot.CHEST);
++ public static final EquipmentSlotGroup BODY = get("body", EquipmentSlot.BODY); // Paper - add missing slot group
+ //
+ private final String key;
+ private final Predicate<EquipmentSlot> predicate;