Use toString() method in ComponentUtil

This commit is contained in:
FlorianMichael 2024-04-20 22:52:40 +02:00
parent bcbe69d24c
commit 3055a4277d
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ public final class ComponentUtil {
public static @Nullable String tagToJsonString(@Nullable final Tag tag) {
try {
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) {
Via.getPlatform().getLogger().log(Level.SEVERE, "Error converting tag: " + tag, e);
return plainToJson("<error>").toString();