Paper/patches/api/0476-Expose-hasColor-to-leather-armor.patch

26 lines
1.0 KiB
Diff
Raw Normal View History

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/inventory/meta/LeatherArmorMeta.java b/src/main/java/org/bukkit/inventory/meta/LeatherArmorMeta.java
index 7f9eabcaa4d803ee524a9cc8717379fe6a93a5af..496f4b256406a4f38f36471f57d8529b3f29b6a1 100644
--- a/src/main/java/org/bukkit/inventory/meta/LeatherArmorMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/LeatherArmorMeta.java
@@ -33,4 +33,14 @@ public interface LeatherArmorMeta extends ItemMeta {
@Override
@NotNull
LeatherArmorMeta clone();
+
+ // Paper start - Expose #hasColor to leather armor
+ /**
+ * Checks whether this leather armor is dyed
+ * (i.e. has a color different from {@link ItemFactory#getDefaultLeatherColor()})
+ *
+ * @return whether this leather armor is dyed
+ */
+ boolean isDyed();
+ // Paper end - Expose #hasColor to leather armor
}