From 1bfa8d41bd01ff507b013727af1cdc6dc31993fe Mon Sep 17 00:00:00 2001 From: Kichura <68134602+Kichura@users.noreply.github.com> Date: Fri, 19 Jan 2024 23:17:06 +0100 Subject: [PATCH] Update AbstractSingleChat to be compatible with latest via*. --- .../aas/codec/packet/common/AbstractSingleChat.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/viaversion/aas/codec/packet/common/AbstractSingleChat.java b/src/main/java/com/viaversion/aas/codec/packet/common/AbstractSingleChat.java index 4e6320c..00252a9 100644 --- a/src/main/java/com/viaversion/aas/codec/packet/common/AbstractSingleChat.java +++ b/src/main/java/com/viaversion/aas/codec/packet/common/AbstractSingleChat.java @@ -6,7 +6,7 @@ import com.viaversion.aas.codec.packet.Packet; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag; -import com.viaversion.viaversion.protocols.protocol1_20_3to1_20_2.util.ComponentConverter; +import com.viaversion.viaversion.util.ComponentUtil; import io.netty.buffer.ByteBuf; import org.jetbrains.annotations.NotNull; @@ -32,13 +32,13 @@ public class AbstractSingleChat implements Packet { public JsonElement getMsgAsJson() { if (msg != null) return msg; - if (msgTag != null) return JsonParser.parseString(ComponentConverter.tagComponentToJson(this.msgTag).toString()); + if (msgTag != null) return JsonParser.parseString(ComponentUtil.tagToJson(this.msgTag).toString()); return null; } public void setMsgForVersion(JsonElement msg, int protocolVersion) { if (protocolVersion >= ProtocolVersion.v1_20_3.getVersion()) { - this.msgTag = ComponentConverter.jsonComponentToTag(com.viaversion.viaversion.libs.gson.JsonParser.parseString(msg.toString())); + this.msgTag = ComponentUtil.jsonToTag(com.viaversion.viaversion.libs.gson.JsonParser.parseString(msg.toString())); } else { this.msg = msg; } @@ -61,4 +61,4 @@ public class AbstractSingleChat implements Packet { } -} \ No newline at end of file +}