2024-05-01 19:14:42 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: SoSeDiK <mrsosedik@gmail.com>
|
|
|
|
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
|
2024-05-29 22:58:57 +02:00
|
|
|
index 4e423c4790d7b03c283c9a5fa94bce4a1153445e..1e8a76f6dd54931eec261653a7bd51b6d18d3c68 100644
|
2024-05-01 19:14:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
2024-05-26 00:58:56 +02:00
|
|
|
@@ -134,4 +134,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
|
2024-05-01 19:14:42 +02:00
|
|
|
}
|
|
|
|
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
|
2024-05-29 22:58:57 +02:00
|
|
|
index 70c0d4cc85c045d040a35cd406f3f7ce9b6a58fa..0860d85fb9c6d0567f678569efb3c560f58612a9 100644
|
2024-05-01 19:14:42 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
2024-05-26 00:58:56 +02:00
|
|
|
@@ -183,4 +183,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
|
2024-05-01 19:14:42 +02:00
|
|
|
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
|
|
|
|
}
|