// Path: scripting/network/ScriptPacketHandler.java
// public abstract class ScriptPacketHandler {
// 
// 	public abstract void handleSelection(SelectionPacket pkt, EntityPlayer player);
// 	public abstract void handleHasScripts(HasScriptsPacket pkt, EntityPlayer player);
// 	public abstract void handleState(StatePacket pkt, EntityPlayer player);
// 
// 	public abstract void handleSettings(SettingsPacket pkt, EntityPlayer player);
// 
// 	public abstract void handleEntityNBT(EntityNBTPacket pkt, EntityPlayer player);
// 	public abstract void handleTileNBT(TileNBTPacket pkt, EntityPlayer player);
// 
// 	public abstract void handleCloseGUI(CloseGUIPacket pkt, EntityPlayer player);
// 	public abstract void handleRequest(PacketType type, String info, EntityPlayer player);
// 
// 	protected abstract boolean hasPermission(EntityPlayer player);
// 
// 	public final void handlePacket(ScriptPacket packet, EntityPlayer player) {
// 		if (hasPermission(player))
// 			packet.execute(this, player);
// 	}
// }


import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import scripting.network.ScriptPacketHandler;
import com.google.common.primitives.UnsignedBytes;
package scripting.packet;





public class RequestPacket extends ScriptPacket {

	private byte request;
	private String info;
	
	@Override
	public ScriptPacket readData(Object... data) {
		request = (Byte) data[0];
		if (data.length > 1)
			info = (String) data[1];
		return this;
	}
	
	@Override
	public void encodeInto(ChannelHandlerContext ctx, ByteBuf to) throws IOException { 
		to.writeByte(request);
		writeString(info != null ? info : "", to);
	}

	@Override
	public void decodeFrom(ChannelHandlerContext ctx, ByteBuf from) throws IOException { 
		request = from.readByte();
		info = readString(from);
	}

	@Override
// Path: scripting/network/ScriptPacketHandler.java
// public abstract class ScriptPacketHandler {
// 
// 	public abstract void handleSelection(SelectionPacket pkt, EntityPlayer player);
// 	public abstract void handleHasScripts(HasScriptsPacket pkt, EntityPlayer player);
// 	public abstract void handleState(StatePacket pkt, EntityPlayer player);
// 
// 	public abstract void handleSettings(SettingsPacket pkt, EntityPlayer player);
// 
// 	public abstract void handleEntityNBT(EntityNBTPacket pkt, EntityPlayer player);
// 	public abstract void handleTileNBT(TileNBTPacket pkt, EntityPlayer player);
// 
// 	public abstract void handleCloseGUI(CloseGUIPacket pkt, EntityPlayer player);
// 	public abstract void handleRequest(PacketType type, String info, EntityPlayer player);
// 
// 	protected abstract boolean hasPermission(EntityPlayer player);
// 
// 	public final void handlePacket(ScriptPacket packet, EntityPlayer player) {
// 		if (hasPermission(player))
// 			packet.execute(this, player);
// 	}
// }


// Path: scripting/packet/RequestPacket.java
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import scripting.network.ScriptPacketHandler;
import com.google.common.primitives.UnsignedBytes;

package scripting.packet;





public class RequestPacket extends ScriptPacket {

	private byte request;
	private String info;
	
	@Override
	public ScriptPacket readData(Object... data) {
		request = (Byte) data[0];
		if (data.length > 1)
			info = (String) data[1];
		return this;
	}
	
	@Override
	public void encodeInto(ChannelHandlerContext ctx, ByteBuf to) throws IOException { 
		to.writeByte(request);
		writeString(info != null ? info : "", to);
	}

	@Override
	public void decodeFrom(ChannelHandlerContext ctx, ByteBuf from) throws IOException { 
		request = from.readByte();
		info = readString(from);
	}

	@Override
	public void execute(ScriptPacketHandler handler, EntityPlayer player) {