Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fall back to wrapping the name in a component. Should fix #349 for real.
Dieser Commit ist enthalten in:
Ursprung
46e34ddb7f
Commit
9d36f9094d
@ -57,9 +57,17 @@ public class VelocityLegacyHoverEventSerializer implements LegacyHoverEventSeria
|
||||
Decoder<Component, String, ? extends RuntimeException> componentDecoder) throws IOException {
|
||||
String snbt = PlainComponentSerializer.plain().serialize(input);
|
||||
CompoundBinaryTag item = TagStringIO.get().asCompound(snbt);
|
||||
|
||||
Component name;
|
||||
try {
|
||||
name = componentDecoder.decode(item.getString("name"));
|
||||
} catch (Exception e) {
|
||||
name = TextComponent.of(item.getString("name"));
|
||||
}
|
||||
|
||||
return new ShowEntity(Key.of(item.getString("type")),
|
||||
UUID.fromString(item.getString("id")),
|
||||
componentDecoder.decode(item.getString("name")));
|
||||
name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren