// Path: src/main/java/com/creativemd/igcm/packets/OpenGUIPacket.java
// public class OpenGUIPacket extends CreativeCorePacket {
// 	
// 	public OpenGUIPacket() {
// 		
// 	}
// 	
// 	@Override
// 	public void writeBytes(ByteBuf buf) {
// 		
// 	}
// 	
// 	@Override
// 	public void readBytes(ByteBuf buf) {
// 		
// 	}
// 	
// 	@Override
// 	public void executeClient(EntityPlayer player) {
// 		
// 	}
// 	
// 	@Override
// 	public void executeServer(EntityPlayer player) {
// 		if (IGCM.gui.checkPermission(player.getServer(), player))
// 			IGCMGuiManager.openConfigGui(player);
// 	}
// 	
// }


import com.creativemd.creativecore.common.gui.mc.ContainerSub;
import com.creativemd.creativecore.common.packet.PacketHandler;
import com.creativemd.igcm.packets.OpenGUIPacket;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
package com.creativemd.igcm.client;



@SideOnly(Side.CLIENT)
public class IGCMClientTick {
	
	public Minecraft mc = Minecraft.getMinecraft();
	
	@SubscribeEvent
	public void openGui(RenderTickEvent event) {
		if (mc.player != null && mc.world != null) {
			if (mc.gameSettings.isKeyDown(IGCMClient.openConfig) && mc.player != null && mc.inGameHasFocus && !(mc.player.openContainer instanceof ContainerSub))
// Path: src/main/java/com/creativemd/igcm/packets/OpenGUIPacket.java
// public class OpenGUIPacket extends CreativeCorePacket {
// 	
// 	public OpenGUIPacket() {
// 		
// 	}
// 	
// 	@Override
// 	public void writeBytes(ByteBuf buf) {
// 		
// 	}
// 	
// 	@Override
// 	public void readBytes(ByteBuf buf) {
// 		
// 	}
// 	
// 	@Override
// 	public void executeClient(EntityPlayer player) {
// 		
// 	}
// 	
// 	@Override
// 	public void executeServer(EntityPlayer player) {
// 		if (IGCM.gui.checkPermission(player.getServer(), player))
// 			IGCMGuiManager.openConfigGui(player);
// 	}
// 	
// }


// Path: src/main/java/com/creativemd/igcm/client/IGCMClientTick.java
import com.creativemd.creativecore.common.gui.mc.ContainerSub;
import com.creativemd.creativecore.common.packet.PacketHandler;
import com.creativemd.igcm.packets.OpenGUIPacket;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

package com.creativemd.igcm.client;



@SideOnly(Side.CLIENT)
public class IGCMClientTick {
	
	public Minecraft mc = Minecraft.getMinecraft();
	
	@SubscribeEvent
	public void openGui(RenderTickEvent event) {
		if (mc.player != null && mc.world != null) {
			if (mc.gameSettings.isKeyDown(IGCMClient.openConfig) && mc.player != null && mc.inGameHasFocus && !(mc.player.openContainer instanceof ContainerSub))
				PacketHandler.sendPacketToServer(new OpenGUIPacket());