mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +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 3109df67e42838f3e69681326efb1caf237548a5..62965625b187da28e2cead1d94bae2509c5943c3 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 cdbf91f1fce21a84b74412a985a8c7c93626768d..f48e4086af9cef0166e2a5108292c8a3d3833390 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
|
|
}
|