From 5c27c5e92f19a9026c328af18651e3a9f8b4e23f Mon Sep 17 00:00:00 2001 From: Patbox Date: Mon, 9 Dec 2024 21:23:21 +0100 Subject: [PATCH] Debug read all the data --- .../xyz/nucleoid/extras/network/BungeeCordPayload.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/nucleoid/extras/network/BungeeCordPayload.java b/src/main/java/xyz/nucleoid/extras/network/BungeeCordPayload.java index 49e094b..5dbdd10 100644 --- a/src/main/java/xyz/nucleoid/extras/network/BungeeCordPayload.java +++ b/src/main/java/xyz/nucleoid/extras/network/BungeeCordPayload.java @@ -7,6 +7,8 @@ import net.minecraft.network.packet.CustomPayload; import net.minecraft.util.Identifier; +import java.nio.charset.StandardCharsets; + public record BungeeCordPayload(byte[] data) implements CustomPayload { public static final CustomPayload.Id ID = new CustomPayload.Id<>(Identifier.of("bungeecord", "main")); @@ -22,6 +24,9 @@ public CustomPayload.Id getId() { } private static BungeeCordPayload read(ByteBuf buf) { - return new BungeeCordPayload(PacketByteBuf.readByteArray(buf)); + var data = PacketByteBuf.readByteArray(buf); + // debug + System.out.println(new String(data, StandardCharsets.UTF_8)); + return new BungeeCordPayload(data); } }