mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-27 02:21:38 +01:00
Made FramedPacket immutable
This commit is contained in:
parent
7347c8df68
commit
6c813e9c26
@ -13,7 +13,7 @@ public class GroupedPacketHandler extends MessageToByteEncoder<FramedPacket> {
|
||||
|
||||
@Override
|
||||
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, FramedPacket msg, boolean preferDirect) {
|
||||
return msg.body.retainedSlice();
|
||||
return msg.getBody().retainedSlice();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,10 +9,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class FramedPacket {
|
||||
|
||||
public final ByteBuf body;
|
||||
private final ByteBuf body;
|
||||
|
||||
public FramedPacket(@NotNull ByteBuf body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ByteBuf getBody() {
|
||||
return body;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user