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-06-15 18:28:18 +02:00
|
|
|
index 299f2f4f143f753f3cd8a020c8e6ae46298e0f6f..51d7263cdd34359d9cdf72cc01ba654b519f838d 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-06-15 18:28:18 +02:00
|
|
|
@@ -118,4 +118,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-06-15 18:28:18 +02:00
|
|
|
index f1dbfba7ec11b12ead627f098a0b833f49be8000..49889026661fb2a558e14569324016d637de27a0 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-06-15 18:28:18 +02:00
|
|
|
@@ -177,4 +177,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
|
|
|
|
}
|