forked from virt-mirrors/Sit
1.20-1.20.1 fix
This commit is contained in:
parent
6ea2982876
commit
ede8f290dc
2 changed files with 14 additions and 7 deletions
|
@ -14,7 +14,7 @@ public class PacketBuilder {
|
|||
private PacketByteBuf packetByteBuf = PacketByteBufs.create();
|
||||
public PacketBuilder(PacketByteBuf buf) {
|
||||
// Read any data sent in the packet
|
||||
message = StandardCharsets.UTF_8.decode(ByteBuffer.wrap(buf.array())).toString().trim();
|
||||
message = buf.toString(StandardCharsets.UTF_8);
|
||||
packetByteBuf = buf;
|
||||
}
|
||||
public PacketBuilder(String message) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue