From d5b93a016718ba7869694b8de3615491611bddcc Mon Sep 17 00:00:00 2001 From: SoSeDiK Date: Wed, 1 May 2024 10:58:50 +0300 Subject: [PATCH] Expose #hasColor to leather armor --- .../craftbukkit/inventory/CraftMetaColorableArmor.java | 7 +++++++ .../craftbukkit/inventory/CraftMetaLeatherArmor.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java index 6517ec4933..dc6398cfbd 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java @@ -100,4 +100,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable } return original != hash ? CraftMetaColorableArmor.class.hashCode() ^ hash : hash; } + + // Paper start - Expose #hasColor to leather armor + @Override + public boolean isDyed() { + return hasColor(); + } + // Paper end - Expose #hasColor to leather armor } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index e8c950aa74..e76749bffa 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -156,4 +156,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta { builder.put(CraftMetaLeatherArmor.COLOR.BUKKIT, meta.getColor()); } } + + // Paper start - Expose #hasColor to leather armor + @Override + public boolean isDyed() { + return hasColor(); + } + // Paper end - Expose #hasColor to leather armor }