Skip to content

Commit

Permalink
Fix hide attributes item flag for Paper forks on 1.21+
Browse files Browse the repository at this point in the history
Regression caused by PaperMC/Paper@a6ceda1
  • Loading branch information
Krakenied committed Jul 24, 2024
1 parent 1e796fe commit 545267f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}
}
Expand Down

0 comments on commit 545267f

Please sign in to comment.