/*
 * Copyright (C) 2014 The TridentSDK Team
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.tridentsdk.server.packets.handshake.client;

import io.netty.buffer.ByteBuf;
import net.tridentsdk.server.netty.Codec;
import net.tridentsdk.server.netty.packet.Packet;
import net.tridentsdk.server.netty.packet.PacketType;
import net.tridentsdk.server.netty.protocol.Protocol4;

/**
 *
 */
public class PacketClientHandshake implements Packet {
    int    protocolVersion;
    String address;
    short  port;
    int    nextState;

    @Override
    public Packet decode(ByteBuf buf) {
        this.protocolVersion = Codec.readVarInt32(buf);
        this.address = Codec.readString(buf);
        this.port = buf.readShort();
        this.nextState = Codec.readVarInt32(buf);
        return this;
    }

    @Override
    public ByteBuf encode() {
        throw new IllegalStateException("PacketClientHandshake cannot be encoded!");
    }

    @Override
    public PacketType getType() {
        return Protocol4.Handshake.Client.HANDSHAKE;
    }
}

@@ -989,16 +989,108 @@
 %0A%0A/**%0A *
+ The login packet sent to connect the server to the client%0A *%0A * @author The TridentSDK Team
 %0A */%0Apub
@@ -1492,32 +1492,155 @@
 rn this;%0A    %7D%0A%0A
+    /**%0A     * %7B@inheritDoc%7D%0A     *%0A     * %3Cp%3ECannot be encoded. Throws %7B@link UnsupportedOperationException%7D.%3C/p%3E%0A     */%0A
     @Override%0A  
@@ -1689,20 +1689,28 @@
 new 
-IllegalState
+UnsupportedOperation
 Exce

Update PacketClientHandshake.java