mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
38 lines
1.8 KiB
Diff
38 lines
1.8 KiB
Diff
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
|
|
index 4e423c4790d7b03c283c9a5fa94bce4a1153445e..1e8a76f6dd54931eec261653a7bd51b6d18d3c68 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
|
@@ -134,4 +134,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 70c0d4cc85c045d040a35cd406f3f7ce9b6a58fa..0860d85fb9c6d0567f678569efb3c560f58612a9 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
|
@@ -183,4 +183,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
|
|
}
|