mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 19:59:58 +00:00
24 lines
873 B
Java
24 lines
873 B
Java
package crazypants.enderio.machine.hypercube;
|
|
|
|
import net.minecraft.entity.player.EntityPlayerMP;
|
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
|
import cpw.mods.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent;
|
|
import crazypants.enderio.network.PacketHandler;
|
|
|
|
public class ConnectionHandler {
|
|
|
|
//to lazy to create a new class
|
|
@SubscribeEvent
|
|
public void onPlayerLoggon(PlayerLoggedInEvent evt) {
|
|
PacketHandler.INSTANCE.sendTo(new PacketChannelList(evt.player, true), (EntityPlayerMP) evt.player);
|
|
PacketHandler.INSTANCE.sendTo(new PacketChannelList(evt.player, false), (EntityPlayerMP) evt.player);
|
|
}
|
|
|
|
@SubscribeEvent
|
|
public void onDisconnectedFromServer(ClientDisconnectionFromServerEvent evt) {
|
|
ClientChannelRegister.instance.reset();
|
|
}
|
|
|
|
}
|