diff options
author | Lulu13022002 <[email protected]> | 2024-11-09 23:26:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-09 23:26:01 +0100 |
commit | 59b79c8bbb1f518676d52156d36bda66f84c7fea (patch) | |
tree | 0628ce4ef784e0ce009cf2a7ed7926a8e2ac9d68 /patches/server/0953-General-ItemMeta-fixes.patch | |
parent | 9d1c91d08332c1b56d50b00632aff82e5e3bbecb (diff) | |
download | Paper-59b79c8bbb1f518676d52156d36bda66f84c7fea.tar.gz Paper-59b79c8bbb1f518676d52156d36bda66f84c7fea.zip |
Fix NPE with enchantable (#11557)
Diffstat (limited to 'patches/server/0953-General-ItemMeta-fixes.patch')
-rw-r--r-- | patches/server/0953-General-ItemMeta-fixes.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0953-General-ItemMeta-fixes.patch b/patches/server/0953-General-ItemMeta-fixes.patch index 2d0ebcfcf9..8780735dae 100644 --- a/patches/server/0953-General-ItemMeta-fixes.patch +++ b/patches/server/0953-General-ItemMeta-fixes.patch @@ -1049,7 +1049,7 @@ index 566d893a413fd04b99e83dc2da8fe958a48492a8..a944803771d514572f94b4e98a6d4435 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 14aab3a2adfde7a236610be2b928651bc01067f5..71d0ade48d450b76be9cb396ac613fa4c783679e 100644 +index 14aab3a2adfde7a236610be2b928651bc01067f5..069c79aecc190f62f2d217b3e9868677845b5dc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -199,9 +199,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1181,7 +1181,7 @@ index 14aab3a2adfde7a236610be2b928651bc01067f5..71d0ade48d450b76be9cb396ac613fa4 @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; } |