Fix issue were glow was not removed.

If glow was applied to a panel item, but then the glow setting was set
to false, the glow was not removed from the panel item.

Relates to https://github.com/BentoBoxWorld/AOneBlock/issues/326
This commit is contained in:
tastybento 2023-07-20 00:27:27 -07:00
parent 8ce78c8fe0
commit 850939f3a8

View File

@ -130,8 +130,13 @@ public class PanelItem {
public void setGlow(boolean glow) {
this.glow = glow;
if (meta != null) {
meta.addEnchant(Enchantment.ARROW_DAMAGE, 0, glow);
if (glow) {
meta.addEnchant(Enchantment.ARROW_DAMAGE, 0, glow);
} else {
meta.removeEnchant(Enchantment.ARROW_DAMAGE);
}
icon.setItemMeta(meta);
}
}