From 545267f98ca9b6930f3f5447751cd01c6cbf2210 Mon Sep 17 00:00:00 2001 From: Krakenied Date: Wed, 24 Jul 2024 22:03:13 +0200 Subject: [PATCH] Fix hide attributes item flag for Paper forks on 1.21+ Regression caused by https://github.com/PaperMC/Paper/commit/a6ceda12c54cd8b7d272fe50e744c9b9a26d0838 --- src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java b/src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java index 2e3a533..2c59931 100644 --- a/src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java +++ b/src/main/java/com/extendedclip/deluxemenus/menu/MenuItem.java @@ -9,6 +9,7 @@ import com.extendedclip.deluxemenus.utils.ItemUtils; import com.extendedclip.deluxemenus.utils.StringUtils; import com.extendedclip.deluxemenus.utils.VersionHelper; +import com.google.common.collect.ImmutableMultimap; import org.bukkit.Color; import org.bukkit.FireworkEffect; import org.bukkit.Material; @@ -394,7 +395,7 @@ public ItemStack getItemStack(@NotNull final MenuHolder holder) { itemMeta.addItemFlags(flag); if (flag == ItemFlag.HIDE_ATTRIBUTES && VersionHelper.HAS_DATA_COMPONENTS) { - itemMeta.setAttributeModifiers(null); + itemMeta.setAttributeModifiers(ImmutableMultimap.of()); } } }