com.jnngl.server.PacketEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of totalcomputers Show documentation
Show all versions of totalcomputers Show documentation
Computers in vanilla Minecraft | TotalOS SDK
package com.jnngl.server;
import com.jnngl.server.protocol.Packet;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
public class PacketEncoder extends MessageToByteEncoder {
@Override
protected void encode(ChannelHandlerContext ctx, Packet msg, ByteBuf out) {
if(Server.DEBUG) {
System.out.println("S -> C: " + msg.getClass().getSimpleName()
+ " (0x" + String.format("%x", msg.getPacketID()) + ")");
}
msg.write(out);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy