Finish and create passing unit tests for the integrity of all packet classes.

This commit is contained in:
md_5
2013-05-30 17:34:56 +10:00
parent 835e4e332c
commit ad4c143ce4
22 changed files with 380 additions and 274 deletions

View File

@@ -13,6 +13,7 @@ public class DefinedPacketEncoder extends MessageToByteEncoder<DefinedPacket>
@Override
protected void encode(ChannelHandlerContext ctx, DefinedPacket msg, ByteBuf out) throws Exception
{
out.writeBytes( msg.getPacket() );
out.writeByte( msg.getId() );
msg.write( out );
}
}

View File

@@ -0,0 +1,13 @@
package net.md_5.bungee.netty;
public abstract class PacketHandler extends net.md_5.bungee.protocol.packet.PacketHandler
{
public void connected(ChannelWrapper channel) throws Exception
{
}
public void disconnected(ChannelWrapper channel) throws Exception
{
}
}