@SubscribeEvent public void clientConnectedtoServer(FMLNetworkEvent.ServerConnectionFromClientEvent event) { if (!CreeperHost.instance.active) return; MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); if (server == null || server.isSinglePlayer() || discoverMode != Discoverability.PUBLIC) return; INetHandlerPlayServer handler = event.handler; if (handler instanceof NetHandlerPlayServer) { EntityPlayerMP entity = ((NetHandlerPlayServer) handler).playerEntity; playersJoined.add(entity.getUniqueID()); } }
@SubscribeEvent public void clientConnectedtoServer(FMLNetworkEvent.ServerConnectionFromClientEvent event) { if (!CreeperHost.instance.active) return; MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); if (server == null || server.isSinglePlayer() || discoverMode != Discoverability.PUBLIC) return; INetHandlerPlayServer handler = event.getHandler(); if (handler instanceof NetHandlerPlayServer) { EntityPlayerMP entity = ((NetHandlerPlayServer)handler).playerEntity; playersJoined.add(entity.getUniqueID()); } }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processCustomPayload(this); if (this.data != null) { this.data.release(); } }
@Override public IThreadListener getWorldThread(INetHandler net) { if (net instanceof INetHandlerPlayClient || net instanceof INetHandlerLoginClient || net instanceof INetHandlerStatusClient) return getClient(); if (net instanceof INetHandlerHandshakeServer || net instanceof INetHandlerLoginServer || net instanceof INetHandlerPlayServer || net instanceof INetHandlerStatusServer) return getServer(); throw new RuntimeException("Unknown INetHandler: " + net); }
@SubscribeEvent public void onDisconnect(FMLNetworkEvent.ServerDisconnectionFromClientEvent event) { INetHandlerPlayServer handlerServer = event.getHandler(); if(handlerServer instanceof NetHandlerPlayServer) { purgeSelection(((NetHandlerPlayServer) handlerServer).player); } }
@Override public void handlePacket(PacketCustom packet, EntityPlayerMP sender, INetHandlerPlayServer handler) { handlePacket((WorldServer) sender.world, sender, packet); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processClientSettings(this); }
public ServerConnectionFromClientEvent(NetworkManager manager) { super((INetHandlerPlayServer) manager.getNetHandler(), INetHandlerPlayServer.class, manager); this.isLocal = manager.isLocalChannel(); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processSteerBoat(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processConfirmTransaction(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processChatMessage(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.handleAnimation(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processCreativeInventoryAction(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.handleResourcePackStatus(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processUseEntity(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processCloseWindow(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processPlayerDigging(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processEnchantItem(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processPlayer(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processKeepAlive(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processEntityAction(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processTabComplete(this); }
public Packet<INetHandlerPlayServer> toC17Packet() { return new CPacketCustomPayload(channel, payload); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processInput(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processClickWindow(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processUpdateSign(this); }
/** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processClientStatus(this); }