Fix chat meta conversion

Fixes #213
This commit is contained in:
KennyTV 2020-06-29 10:01:27 +02:00
parent 54de77a110
commit 2cea70e643
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -323,7 +323,7 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<Protocol1_12_2To1_13
// Rewrite Custom Name from Chat to String
registerMetaHandler().filter(Entity1_13Types.EntityType.ENTITY, true, 2).handle(e -> {
Metadata meta = e.getData();
String value = (String) meta.getValue();
String value = meta.getValue().toString();
if (value.isEmpty()) return meta;
meta.setValue(ChatRewriter.jsonTextToLegacy(value));
return meta;