Fixed reverting modifying non-target items leading to *all* items with HideFlags being modified

This commit is contained in:
Auxilor 2021-04-22 12:06:39 +01:00
parent f61745613b
commit a1b9ceafc7

View File

@ -200,6 +200,10 @@ public class EnchantDisplay extends DisplayModule {
@Override
protected void revert(@NotNull final ItemStack itemStack) {
if (!EnchantmentTarget.ALL.getMaterials().contains(itemStack.getType())) {
return;
}
ItemMeta meta = itemStack.getItemMeta();
assert meta != null;