@ToString
@EqualsAndHashCode(callSuper = false)
public class Packet0KeepAlive extends Packet {

    private int id;

    public Packet0KeepAlive() {
    }

    @Override
    public void read(ByteBuf in) {
        id = in.readInt();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeInt(id);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet10HeldItem extends Packet {

    private short slot;

    public Packet10HeldItem() {
    }

    @Override
    public void read(ByteBuf in) {
        slot = in.readShort();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeShort(slot);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet12Animation extends Packet {

    private int entity;
    private byte animation;

    public Packet12Animation() {
    }

    @Override
    public void read(ByteBuf in) {
        entity = in.readInt();
        animation = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeInt(entity);
        out.writeByte(animation);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet13EntityAction extends Packet {

    private int entity;
    private byte action;

    public Packet13EntityAction() {
    }

    @Override
    public void read(ByteBuf in) {
        entity = in.readInt();
        action = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeInt(entity);
        out.writeByte(action);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet3ChatMessage extends Packet {

    private String message;

    public Packet3ChatMessage() {
    }

    @Override
    public void read(ByteBuf in) {
        message = readString(in);
    }

    @Override
    public void write(ByteBuf out) {
        writeString(out, message);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet6AConfirmTransaction extends Packet {

    private byte windowId;
    private short actionNumber;
    private boolean accepted;

    public Packet6AConfirmTransaction() {
    }

    @Override
    public void read(ByteBuf in) {
        windowId = in.readByte();
        actionNumber = in.readShort();
        accepted = in.readBoolean();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeByte(windowId);
        out.writeShort(actionNumber);
        out.writeBoolean(accepted);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet6CEnchantItem extends Packet {

    private byte windowId;
    private byte enchantment;

    public Packet6CEnchantItem() {
    }

    @Override
    public void read(ByteBuf in) {
        windowId = in.readByte();
        enchantment = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeByte(windowId);
        out.writeByte(enchantment);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet7UseEntity extends Packet {

    private int user;
    private int target;
    private boolean mouse;

    public Packet7UseEntity() {
    }

    @Override
    public void read(ByteBuf in) {
        user = in.readInt();
        target = in.readInt();
        mouse = in.readBoolean();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeInt(user);
        out.writeInt(target);
        out.writeBoolean(mouse);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class Packet82UpdateSign extends Packet {

    private int x;
    private short y;
    private int z;
    private String[] lines = new String[4];

    public Packet82UpdateSign() {
    }

    @Override
    public void read(ByteBuf in) {
        x = in.readInt();
        y = in.readShort();
        z = in.readInt();
        for (int i = 0; i < lines.length; i++) {
            lines[i] = readString(in);
        }
    }

    @Override
    public void write(ByteBuf out) {
        out.writeInt(x);
        out.writeShort(y);
        out.writeInt(z);
        for (int i = 0; i < lines.length; i++) {
            writeString(out, lines[i]);
        }
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketAFlying extends Packet {

    protected boolean hasLocation;
    protected boolean hasLook;
    //
    protected boolean onGround;
    protected double x;
    protected double y;
    protected double stance;
    protected double z;
    protected float yaw;
    protected float pitch;

    public PacketAFlying() {
    }

    @Override
    public void read(ByteBuf in) {
        onGround = in.readBoolean();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeBoolean(onGround);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketCAPlayerAbilities extends Packet {

    private byte flags;
    private byte flyingSpeed;
    private byte walkingSpeed;

    public PacketCAPlayerAbilities() {
    }

    @Override
    public void read(ByteBuf in) {
        flags = in.readByte();
        flyingSpeed = in.readByte();
        walkingSpeed = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeByte(flags);
        out.writeByte(flyingSpeed);
        out.writeByte(walkingSpeed);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketCBTabComplete extends Packet {

    private String text;

    public PacketCBTabComplete() {
    }

    @Override
    public void read(ByteBuf in) {
        text = readString(in);
    }

    @Override
    public void write(ByteBuf out) {
        writeString(out, text);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketCCClientInfo extends Packet {

    private String locale;
    private byte viewDistance;
    private byte chatFlags;
    private byte difficulty;

    public PacketCCClientInfo() {
    }

    @Override
    public void read(ByteBuf in) {
        locale = readString(in);
        viewDistance = in.readByte();
        chatFlags = in.readByte();
        difficulty = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        writeString(out, locale);
        out.writeByte(viewDistance);
        out.writeByte(chatFlags);
        out.writeByte(difficulty);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketCDClientStatus extends Packet {

    private byte status;

    public PacketCDClientStatus() {
    }

    @Override
    public void read(ByteBuf in) {
        status = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeByte(status);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketEDig extends Packet {

    private byte status;
    private int x;
    private byte y;
    private int z;
    private byte face;

    public PacketEDig() {
    }

    @Override
    public void read(ByteBuf in) {
        status = in.readByte();
        x = in.readInt();
        y = in.readByte();
        z = in.readInt();
        face = in.readByte();
    }

    @Override
    public void write(ByteBuf out) {
        out.writeByte(status);
        out.writeInt(x);
        out.writeByte(y);
        out.writeInt(z);
        out.writeByte(face);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketFAPluginMessage extends Packet {

    private String channel;
    private byte[] data;

    public PacketFAPluginMessage() {
    }

    @Override
    public void read(ByteBuf in) {
        channel = readString(in);
        data = readBytes(in);
    }

    @Override
    public void write(ByteBuf out) {
        writeString(out, channel);
        writeBytes(out, data);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }
} @ToString
@EqualsAndHashCode(callSuper = false)
public class PacketFFDisconnect extends Packet {

    private String reason;

    public PacketFFDisconnect() {
    }

    public PacketFFDisconnect(String reason) {
        this.reason = reason;
    }

    @Override
    public void read(ByteBuf in) {
        reason = readString(in);
    }

    @Override
    public void write(ByteBuf out) {
        writeString(out, reason);
    }

    @Override
    public void handle(PacketHandler handler) {
        handler.handle(this);
    }

    public String getReason() {
        return reason;
    }
}
import com.md_5.fondue.protocol.packet.Packet0KeepAlive;
import com.md_5.fondue.protocol.packet.Packet10HeldItem;
import com.md_5.fondue.protocol.packet.Packet12Animation;
import com.md_5.fondue.protocol.packet.Packet13EntityAction;
import com.md_5.fondue.protocol.packet.Packet3ChatMessage;
import com.md_5.fondue.protocol.packet.Packet6AConfirmTransaction;
import com.md_5.fondue.protocol.packet.Packet6CEnchantItem;
import com.md_5.fondue.protocol.packet.Packet7UseEntity;
import com.md_5.fondue.protocol.packet.Packet82UpdateSign;
import com.md_5.fondue.protocol.packet.PacketAFlying;
import com.md_5.fondue.protocol.packet.PacketCAPlayerAbilities;
import com.md_5.fondue.protocol.packet.PacketCBTabComplete;
import com.md_5.fondue.protocol.packet.PacketCCClientInfo;
import com.md_5.fondue.protocol.packet.PacketCDClientStatus;
import com.md_5.fondue.protocol.packet.PacketEDig;
import com.md_5.fondue.protocol.packet.PacketFAPluginMessage;
import com.md_5.fondue.protocol.packet.PacketFFDisconnect;
import java.lang.annotation.Annotation;
package com.md_5.fondue.protocol;


public class ServerHandler extends PacketHandler {

    @Override
    public Class<? extends Annotation> getType() {
        return Server.class;
    }

    @Override
    public void handle(Packet0KeepAlive packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet3ChatMessage packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet7UseEntity packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketAFlying packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketEDig packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet10HeldItem packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet12Animation packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet13EntityAction packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet6AConfirmTransaction packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet6CEnchantItem packet) {
        super.handle(packet);
    }

    @Override
    public void handle(Packet82UpdateSign packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketCAPlayerAbilities packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketCBTabComplete packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketCCClientInfo packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketCDClientStatus packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketFAPluginMessage packet) {
        super.handle(packet);
    }

    @Override
    public void handle(PacketFFDisconnect packet) {