// Path: MODSRC/vazkii/emotes/common/Emotes.java
// @Mod(modid = "Emotes", name = "Emotes", version = "1.0")
// public class Emotes {
// 
// 	@SidedProxy(clientSide = "vazkii.emotes.client.ClientProxy", serverSide = "vazkii.emotes.common.CommonProxy")
// 	public static CommonProxy proxy;
// 	
// 	@EventHandler
// 	public void init(FMLInitializationEvent event) {
// 		proxy.init();
// 	}
// 	
// 	@EventHandler
// 	public void serverStarting(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new CommandEmote());
// 	}
// 	
// }


import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.network.PacketBuffer;
import vazkii.emotes.common.Emotes;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;

	public PacketEmote(String name, String player) {
		this.emoteName = name;
		this.playerName = player;
	}
	
	@Override
	public void fromBytes(ByteBuf buffer) {
		PacketBuffer packet = new PacketBuffer(buffer);
		try {
			emoteName = packet.readStringFromBuffer(32);
			playerName = packet.readStringFromBuffer(32);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void toBytes(ByteBuf buffer) {
		PacketBuffer packet = new PacketBuffer(buffer);
		try {
			packet.writeStringToBuffer(emoteName);
			packet.writeStringToBuffer(playerName);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public IMessage onMessage(PacketEmote message, MessageContext context) {
// Path: MODSRC/vazkii/emotes/common/Emotes.java
// @Mod(modid = "Emotes", name = "Emotes", version = "1.0")
// public class Emotes {
// 
// 	@SidedProxy(clientSide = "vazkii.emotes.client.ClientProxy", serverSide = "vazkii.emotes.common.CommonProxy")
// 	public static CommonProxy proxy;
// 	
// 	@EventHandler
// 	public void init(FMLInitializationEvent event) {
// 		proxy.init();
// 	}
// 	
// 	@EventHandler
// 	public void serverStarting(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new CommandEmote());
// 	}
// 	
// }


// Path: MODSRC/vazkii/emotes/common/network/PacketEmote.java
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.minecraft.network.PacketBuffer;
import vazkii.emotes.common.Emotes;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;


	public PacketEmote(String name, String player) {
		this.emoteName = name;
		this.playerName = player;
	}
	
	@Override
	public void fromBytes(ByteBuf buffer) {
		PacketBuffer packet = new PacketBuffer(buffer);
		try {
			emoteName = packet.readStringFromBuffer(32);
			playerName = packet.readStringFromBuffer(32);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void toBytes(ByteBuf buffer) {
		PacketBuffer packet = new PacketBuffer(buffer);
		try {
			packet.writeStringToBuffer(emoteName);
			packet.writeStringToBuffer(playerName);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public IMessage onMessage(PacketEmote message, MessageContext context) {
		Emotes.proxy.handlePacket(message);