From e9b79a3b7bee028521726e46ce110e89440952a5 Mon Sep 17 00:00:00 2001 From: Rothes <449181985@qq.com> Date: Thu, 26 Oct 2023 10:48:36 +0800 Subject: [PATCH] Fix TeamName being wrapped two times --- .../packetlisteners/server/chat/PlayerChatHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/rothes/protocolstringreplacer/packetlisteners/server/chat/PlayerChatHelper.java b/src/main/java/me/rothes/protocolstringreplacer/packetlisteners/server/chat/PlayerChatHelper.java index 54ac79f..ebebfad 100644 --- a/src/main/java/me/rothes/protocolstringreplacer/packetlisteners/server/chat/PlayerChatHelper.java +++ b/src/main/java/me/rothes/protocolstringreplacer/packetlisteners/server/chat/PlayerChatHelper.java @@ -242,7 +242,7 @@ public static void setDisplayName(Object object, WrappedChatComponent wrappedCha } public static BaseComponent getTeamName(Object object) { - return ComponentSerializer.parse(WrappedChatComponent.fromHandle(getTeamNameWrapped(object)).getJson())[0]; + return ComponentSerializer.parse(getTeamNameWrapped(object).getJson())[0]; } public static WrappedChatComponent getTeamNameWrapped(Object object) {