3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-19 14:30:16 +01:00

Use toString() method in ComponentUtil

Dieser Commit ist enthalten in:
FlorianMichael 2024-04-20 22:52:40 +02:00
Ursprung bcbe69d24c
Commit 3055a4277d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: C2FB87E71C425126

Datei anzeigen

@ -95,7 +95,7 @@ public final class ComponentUtil {
public static @Nullable String tagToJsonString(@Nullable final Tag tag) { public static @Nullable String tagToJsonString(@Nullable final Tag tag) {
try { try {
final ATextComponent component = SerializerVersion.V1_20_3.toComponent(tag); final ATextComponent component = SerializerVersion.V1_20_3.toComponent(tag);
return component != null ? SerializerVersion.V1_20_3.jsonSerializer.serialize(component) : null; return component != null ? SerializerVersion.V1_20_3.toString(component) : null;
} catch (final Exception e) { } catch (final Exception e) {
Via.getPlatform().getLogger().log(Level.SEVERE, "Error converting tag: " + tag, e); Via.getPlatform().getLogger().log(Level.SEVERE, "Error converting tag: " + tag, e);
return plainToJson("<error>").toString(); return plainToJson("<error>").toString();