Fix NPE with enchantable (#11557)
This commit is contained in:
parent
bbc8fc8fec
commit
16f8d0f984
41 changed files with 161 additions and 110 deletions
|
@ -1181,7 +1181,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public void setEnchantable(Integer data) {
|
||||
+ Preconditions.checkArgument(data > 0, "Enchantability must be > 0");
|
||||
+ Preconditions.checkArgument(data == null || data > 0, "Enchantability must be positive"); // Paper
|
||||
this.enchantableValue = data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue