Bug Fixes

This commit is contained in:
Auxilor
2021-11-04 13:32:23 +00:00
parent 6a8637922b
commit 7119da13b7
2 changed files with 8 additions and 1 deletions

View File

@@ -73,6 +73,11 @@ public abstract class AbstractItemStackBuilder<T extends ItemMeta, U extends Abs
@Override
public U addEnchantment(@NotNull final Enchantment enchantment,
final int level) {
//noinspection ConstantConditions
if (enchantment == null) {
return (U) this;
}
meta.addEnchant(enchantment, level, true);
return (U) this;
}