geforkt von Mirrors/Paper
Prevent NPE when removing enchantment with no ItemMeta (#6459)
Dieser Commit ist enthalten in:
Ursprung
9169cf73cc
Commit
b9871610d1
@ -183,6 +183,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- }
|
||||
+ // Paper start - replace entire method
|
||||
+ final ItemMeta itemMeta = this.getItemMeta();
|
||||
+ if (itemMeta == null) return 0;
|
||||
+ int level = itemMeta.getEnchantLevel(ench);
|
||||
+ if (level > 0) {
|
||||
+ itemMeta.removeEnchant(ench);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren