From 0000000000000000000000000000000000000000 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java index 2c9ca54267579a210d4ea192517fc0fbce8e467a..ae94d09b8e0cac77db6a11f85890ff0fb51236f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java @@ -116,4 +116,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/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index 157a7b7351f48e68d2923c72ed3bbe3dcae21383..0368b2a557d3ee5d83474311fbd561480f9e8a2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -162,4 +162,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 }