Skip to content

Commit

Permalink
fixed not emptying optional
Browse files Browse the repository at this point in the history
  • Loading branch information
iTwins committed Aug 11, 2023
1 parent 5ef2296 commit 6d67b86
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6d67b86

Please sign in to comment.