Java 类cpw.mods.fml.common.network.FMLNetworkEvent.ServerConnectionFromClientEvent 实例源码

项目:4Space-5    文件:ConnectionEvents.java   
@SubscribeEvent
public void onConnectionReceived(ServerConnectionFromClientEvent event)
{
    if (ConfigManagerCore.enableDebug)
    {
        Integer[] idList = (Integer[]) WorldUtil.getPlanetList().get(0);
        String ids = "";
        for (int j = 0; j < idList.length; j++)
        {
            ids+=idList[j].toString()+" ";
        }
        GCLog.info("Galacticraft server sending dimension IDs to connecting client: "+ ids);
    }
    event.manager.scheduleOutboundPacket(ConnectionPacket.createDimPacket(WorldUtil.getPlanetListInts()));
    event.manager.scheduleOutboundPacket(ConnectionPacket.createSSPacket(WorldUtil.getSpaceStationListInts()));
    event.manager.scheduleOutboundPacket(ConnectionPacket.createConfigPacket(ConfigManagerCore.getServerConfigOverride()));
}
项目:amunra    文件:ConnectionEvents.java   
@SubscribeEvent
public void onConnectionReceived(ServerConnectionFromClientEvent event)
{
    event.manager.scheduleOutboundPacket(ConnectionPacketAR.createMothershipPacket());
    // config packet
    event.manager.scheduleOutboundPacket(ConnectionPacketAR.createConfigPacket());
}
项目:ComponentEquipment    文件:ConnectionHandler.java   
@SubscribeEvent
public void playerLoggedIn( ServerConnectionFromClientEvent event )
{
    EntityPlayer entity = ( ( NetHandlerPlayServer ) event.handler ).playerEntity;
    QuiverItem.setSelected( entity, 0 );
}