Skip to content

Commit

Permalink
use setEnchantmentGlintOverride, instead of adding an enchantment
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Oct 21, 2024
1 parent 0e21a6b commit d7ddbcd
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1201,19 +1201,8 @@ public static List<ItemBuilder> convertStringList(List<String> itemStrings, Stri
* @param item The item to add glow to.
*/
private void addGlow(ItemStack item) {
if (this.glowing) {
try {
if (item != null) {
ItemMeta itemMeta = item.getItemMeta();

if (itemMeta != null) {
if (itemMeta.hasEnchants()) return;
}

itemMeta.setEnchantmentGlintOverride(true);
item.setItemMeta(itemMeta);
}
} catch (NoClassDefFoundError ignored) {}
if (item != null && this.glowing) {
item.editMeta(itemMeta -> itemMeta.setEnchantmentGlintOverride(true));
}
}

Expand Down

0 comments on commit d7ddbcd

Please sign in to comment.