3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00

SPIGOT-4551: Ignore invalid attribute modifier slots

Dieser Commit ist enthalten in:
md_5 2018-12-25 09:27:17 +11:00
Ursprung dff66dfccd
Commit bd36e200da

Datei anzeigen

@ -421,7 +421,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
continue;
}
EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.fromName(slotName.toLowerCase(Locale.ROOT)));
EquipmentSlot slot = null;
try {
slot = CraftEquipmentSlot.getSlot(EnumItemSlot.fromName(slotName.toLowerCase(Locale.ROOT)));
} catch (IllegalArgumentException ex) {
// SPIGOT-4551 - Slot is invalid, should really match nothing but this is undefined behaviour anyway
}
if (slot == null) {
modifiers.put(attribute, attribMod);
continue;