package common.packet;

import java.io.IOException;

import common.network.IClientLoginHandler;
import common.network.Packet;
import common.network.PacketBuffer;

public class RPacketLoginSuccess implements Packet<IClientLoginHandler> {
	private boolean debug;

	public RPacketLoginSuccess() {
	}

	public RPacketLoginSuccess(boolean debug) {
		this.debug = debug;
	}

	public final void readPacketData(PacketBuffer buf) throws IOException {
		this.debug = buf.readBoolean();
	}

	public final void writePacketData(PacketBuffer buf) throws IOException {
		buf.writeBoolean(this.debug);
	}

	public void processPacket(IClientLoginHandler handler) {
		handler.handleLoginSuccess(this);
	}

	public boolean isDebug() {
		return this.debug;
	}
}
