mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-23 04:58:28 +01:00
Fix Player#applyMending NPE (#2917)
This commit is contained in:
parent
6745971d4e
commit
284b18ef2d
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ of giving the player experience points.
|
|||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||
index 1822178e8..fabc7a8dd 100644
|
||||
index 1822178e8..d96c03a1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||
@@ -0,0 +0,0 @@ public class EnchantmentManager {
|
||||
|
@ -18,9 +18,9 @@ index 1822178e8..fabc7a8dd 100644
|
|||
}
|
||||
|
||||
+ // Paper - OBFHELPER
|
||||
+ public static @Nullable ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) {
|
||||
+ public static @javax.annotation.Nonnull ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) {
|
||||
+ Entry<EnumItemSlot, ItemStack> entry = b(enchantment, entityliving);
|
||||
+ return entry != null ? entry.getValue() : null;
|
||||
+ return entry != null ? entry.getValue() : ItemStack.NULL_ITEM;
|
||||
+ }
|
||||
@Nullable
|
||||
public static Entry<EnumItemSlot, ItemStack> b(Enchantment enchantment, EntityLiving entityliving) {
|
||||
|
|
Loading…
Add table
Reference in a new issue