mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 20:16:19 +01:00
4bc15f13aa
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e2160a18 Make MapCursor#type not depends on deprecated values CraftBukkit Changes: 6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent 28287259c Remove unused import eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor 995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components 9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place 3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners Make MapCursor#type not depends on deprecated values SPIGOT-7761: Ender pearl does not damage or spawn endermites
39 lines
1.8 KiB
Diff
39 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 299f2f4f143f753f3cd8a020c8e6ae46298e0f6f..51d7263cdd34359d9cdf72cc01ba654b519f838d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
|
|
@@ -118,4 +118,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 f1dbfba7ec11b12ead627f098a0b833f49be8000..49889026661fb2a558e14569324016d637de27a0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
|
|
@@ -177,4 +177,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
|
|
}
|