Skip to content

Commit

Permalink
Merge pull request HelpChat#126 from Krakenied/fix/hide-attributes-paper
Browse files Browse the repository at this point in the history
Fix hide attributes item flag for Paper forks on 1.21+
  • Loading branch information
iGabyTM authored Jul 30, 2024
2 parents 1e796fe + 545267f commit 0a3dd5c
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 0a3dd5c

Please sign in to comment.