13
0
geforkt von Mirrors/Paper

Skip invalid enchants in CraftMetaItem

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2017-04-26 15:45:52 +10:00
Ursprung 82c0a41a0d
Commit b47c79c77a

Datei anzeigen

@ -358,7 +358,10 @@ class CraftMetaItem implements ItemMeta, Repairable {
int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT);
int level = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_LVL.NBT);
enchantments.put(Enchantment.getById(id), level);
Enchantment enchant = Enchantment.getById(id);
if (enchant != null) {
enchantments.put(enchant, level);
}
}
return enchantments;