mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-19 05:41:21 +01:00
Little nitpicks
This commit is contained in:
parent
007be52c93
commit
6758737b80
@ -227,7 +227,7 @@ public final class PacketUtils {
|
||||
try {
|
||||
payloadConsumer.accept(packetId, payload);
|
||||
} catch (Exception e) {
|
||||
// Empty
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// Position buffer to read the next packet
|
||||
readBuffer.readerOffset(readerStart + packetLength);
|
||||
|
@ -113,6 +113,10 @@ public final class BinaryBuffer {
|
||||
return writerOffset;
|
||||
}
|
||||
|
||||
public void writerOffset(int offset) {
|
||||
this.writerOffset = offset;
|
||||
}
|
||||
|
||||
public int readableBytes() {
|
||||
return writerOffset - readerOffset;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user