Fixed NotSerializableException when logging items containing attribute data
This commit is contained in:
parent
f729c8a126
commit
b3db65d07d
2 changed files with 12 additions and 5 deletions
|
|
@ -125,12 +125,12 @@ public class ItemMetaHandler {
|
|||
|
||||
if (itemMeta.hasAttributeModifiers()) {
|
||||
for (Map.Entry<Attribute, AttributeModifier> entry : itemMeta.getAttributeModifiers().entries()) {
|
||||
Map<Attribute, Map<String, Object>> attributeList = new HashMap<>();
|
||||
Map<Object, Map<String, Object>> attributeList = new HashMap<>();
|
||||
Attribute attribute = entry.getKey();
|
||||
AttributeModifier modifier = entry.getValue();
|
||||
|
||||
itemMeta.removeAttributeModifier(attribute, modifier);
|
||||
attributeList.put(attribute, modifier.serialize());
|
||||
attributeList.put(BukkitAdapter.ADAPTER.getRegistryKey(attribute), modifier.serialize());
|
||||
modifiers.add(attributeList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue