Skip to content

Commit

Permalink
Packet ids can't be negative
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim203 committed Dec 16, 2021
1 parent a4399f0 commit 9c672c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void translate(GeyserSession session, ClientboundCustomPayloadPacket pack
throw new IllegalStateException("Packet data should be at least 2 bytes long");
}

int packetId = data[0];
int packetId = data[0] & 0xFF;
ByteBuf packetData = Unpooled.wrappedBuffer(data, 1, data.length - 1);

var toSend = new UnknownPacket();
Expand Down

0 comments on commit 9c672c9

Please sign in to comment.