From 6d67b86960fb8a970eeb9a8bc8b10d6156ceb1dc Mon Sep 17 00:00:00 2001 From: iTwins Date: Fri, 11 Aug 2023 18:22:14 +0200 Subject: [PATCH] fixed not emptying optional --- .../thebusybiscuit/slimefun4/api/items/HashedArmorpiece.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/HashedArmorpiece.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/HashedArmorpiece.java index 9d5aa6441d..eff397a435 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/HashedArmorpiece.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/HashedArmorpiece.java @@ -63,6 +63,8 @@ public void update(@Nullable ItemStack stack, @Nullable SlimefunItem item) { ((Damageable) meta).setDamage(0); if (meta instanceof LeatherArmorMeta leatherArmorMeta) { color = Optional.of(leatherArmorMeta.getColor()); + } else { + color = Optional.empty(); } copy.setItemMeta(meta); this.hash = copy.hashCode();