Java 类net.minecraft.network.play.server.S40PacketDisconnect 实例源码

项目:DecompiledMinecraft    文件:NetHandlerPlayServer.java   
/**
 * Kick a player from the server with a reason
 */
public void kickPlayerFromServer(String reason)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(reason);
    this.netManager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
    {
        public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }, new GenericFutureListener[0]);
    this.netManager.disableAutoRead();
    Futures.getUnchecked(this.serverController.addScheduledTask(new Runnable()
    {
        public void run()
        {
            NetHandlerPlayServer.this.netManager.checkDisconnected();
        }
    }));
}
项目:DecompiledMinecraft    文件:NetHandlerPlayServer.java   
/**
 * Kick a player from the server with a reason
 */
public void kickPlayerFromServer(String reason)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(reason);
    this.netManager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
    {
        public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }, new GenericFutureListener[0]);
    this.netManager.disableAutoRead();
    Futures.getUnchecked(this.serverController.addScheduledTask(new Runnable()
    {
        public void run()
        {
            NetHandlerPlayServer.this.netManager.checkDisconnected();
        }
    }));
}
项目:BaseClient    文件:NetHandlerPlayServer.java   
/**
 * Kick a player from the server with a reason
 */
public void kickPlayerFromServer(String reason)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(reason);
    this.netManager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
    {
        public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }, new GenericFutureListener[0]);
    this.netManager.disableAutoRead();
    Futures.getUnchecked(this.serverController.addScheduledTask(new Runnable()
    {
        public void run()
        {
            NetHandlerPlayServer.this.netManager.checkDisconnected();
        }
    }));
}
项目:BaseClient    文件:NetHandlerPlayServer.java   
/**
 * Kick a player from the server with a reason
 */
public void kickPlayerFromServer(String reason)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(reason);
    this.netManager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
    {
        public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }, new GenericFutureListener[0]);
    this.netManager.disableAutoRead();
    Futures.getUnchecked(this.serverController.addScheduledTask(new Runnable()
    {
        public void run()
        {
            NetHandlerPlayServer.this.netManager.checkDisconnected();
        }
    }));
}
项目:TRHS_Club_Mod_2016    文件:NetworkDispatcher.java   
private void kickWithMessage(String message)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(message);
    if (side == Side.CLIENT)
    {
        manager.func_150718_a(chatcomponenttext);
    }
    else
    {
        manager.func_150725_a(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
        {
            @Override
            public void operationComplete(Future<?> result)
            {
                manager.func_150718_a(chatcomponenttext);
            }
        });
    }
    manager.channel().config().setAutoRead(false);
}
项目:CauldronGit    文件:NetworkDispatcher.java   
private void kickWithMessage(String message)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(message);
    if (side == Side.CLIENT)
    {
        manager.closeChannel(chatcomponenttext);
    }
    else
    {
        manager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
        {
            @Override
            public void operationComplete(Future<?> result)
            {
                manager.closeChannel(chatcomponenttext);
            }
        });
    }
    manager.channel().config().setAutoRead(false);
}
项目:Cauldron    文件:NetworkDispatcher.java   
private void kickWithMessage(String message)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(message);
    if (side == Side.CLIENT)
    {
        manager.closeChannel(chatcomponenttext);
    }
    else
    {
        manager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
        {
            @Override
            public void operationComplete(Future<?> result)
            {
                manager.closeChannel(chatcomponenttext);
            }
        });
    }
    manager.channel().config().setAutoRead(false);
}
项目:Cauldron    文件:NetworkDispatcher.java   
private void kickWithMessage(String message)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(message);
    if (side == Side.CLIENT)
    {
        manager.closeChannel(chatcomponenttext);
    }
    else
    {
        manager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
        {
            @Override
            public void operationComplete(Future<?> result)
            {
                manager.closeChannel(chatcomponenttext);
            }
        });
    }
    manager.channel().config().setAutoRead(false);
}
项目:Cauldron    文件:NetworkDispatcher.java   
private void kickWithMessage(String message)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(message);
    if (side == Side.CLIENT)
    {
        manager.closeChannel(chatcomponenttext);
    }
    else
    {
        manager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener<Future<?>>()
        {
            @Override
            public void operationComplete(Future<?> result)
            {
                manager.closeChannel(chatcomponenttext);
            }
        });
    }
    manager.channel().config().setAutoRead(false);
}
项目:Resilience-Client-Source    文件:NetHandlerPlayServer.java   
/**
 * Kick a player from the server with a reason
 */
public void kickPlayerFromServer(String p_147360_1_)
{
    final ChatComponentText var2 = new ChatComponentText(p_147360_1_);
    this.netManager.scheduleOutboundPacket(new S40PacketDisconnect(var2), new GenericFutureListener[] {new GenericFutureListener()
        {
            private static final String __OBFID = "CL_00001453";
            public void operationComplete(Future p_operationComplete_1_)
            {
                NetHandlerPlayServer.this.netManager.closeChannel(var2);
            }
        }
    });
    this.netManager.disableAutoRead();
}
项目:NeptuneMod    文件:NetHandlerPlayServerHelper.java   
public static void kickPlayerFromServer(EntityPlayerMP player, String reason) {
    final ChatComponentText component = new ChatComponentText(reason);
    player.playerNetServerHandler.getNetworkManager().sendPacket(new S40PacketDisconnect(component),
            future -> player.playerNetServerHandler.getNetworkManager().closeChannel(component));
    player.playerNetServerHandler.getNetworkManager().disableAutoRead();
    Futures.getUnchecked(MinecraftServer.getServer().addScheduledTask(()
            -> player.playerNetServerHandler.getNetworkManager().checkDisconnected()));
}
项目:Cauldron    文件:NetHandlerPlayServer.java   
public void kickPlayerFromServer(String p_147360_1_)
{
    // CraftBukkit start
    String leaveMessage = EnumChatFormatting.YELLOW + this.playerEntity.getCommandSenderName() + " left the game.";
    PlayerKickEvent event = new PlayerKickEvent(this.server.getPlayer(this.playerEntity), p_147360_1_, leaveMessage);

    if (this.server.getServer().isServerRunning())
    {
        this.server.getPluginManager().callEvent(event);
    }

    if (event.isCancelled())
    {
        // Do not kick the player
        return;
    }

    // Send the possibly modified leave message
    p_147360_1_ = event.getReason();
    // CraftBukkit end
    final ChatComponentText chatcomponenttext = new ChatComponentText(p_147360_1_);
    this.netManager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener[] {new GenericFutureListener()
    {
        private static final String __OBFID = "CL_00001453";
        public void operationComplete(Future p_operationComplete_1_)
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }});
    this.onDisconnect(chatcomponenttext); // CraftBukkit - Process quit immediately
    this.netManager.disableAutoRead();
}
项目:Cauldron    文件:NetHandlerPlayServer.java   
public void kickPlayerFromServer(String p_147360_1_)
{
    final ChatComponentText chatcomponenttext = new ChatComponentText(p_147360_1_);
    this.netManager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener[] {new GenericFutureListener()
    {
        private static final String __OBFID = "CL_00001453";
        public void operationComplete(Future p_operationComplete_1_)
        {
            NetHandlerPlayServer.this.netManager.closeChannel(chatcomponenttext);
        }
    }
                                                                                                 });
    this.netManager.disableAutoRead();
}
项目:nailed    文件:NailedNetworkManager.java   
public static void stopEndpoints(){
    final ChatComponentText msg = new ChatComponentText("Server shutting down");
    for(final NetworkManager manager : networkManagers){
        manager.sendPacket(new S40PacketDisconnect(msg), new ChannelFutureListener() {
            @Override
            public void operationComplete(ChannelFuture channelFuture) throws Exception {
                manager.closeChannel(msg);
            }
        });
        manager.disableAutoRead();
    }
    for(Channel endpoint : endpoints){
        endpoint.close().syncUninterruptibly();
    }
}
项目:nailed    文件:NailedNetworkManager.java   
public static void processQueuedPackets(){
    synchronized (networkManagers){
        Iterator<NetworkManager> it = networkManagers.iterator();
        while(it.hasNext()){
            final NetworkManager manager = it.next();
            if(!manager.isChannelOpen()){
                it.remove();
                if(manager.getExitMessage() != null){
                    manager.getNetHandler().onDisconnect(manager.getExitMessage());
                }else if(manager.getNetHandler() != null){
                    manager.getNetHandler().onDisconnect(new ChatComponentText("Disconnected"));
                }
            }else{
                try{
                    manager.processReceivedPackets();
                }catch(Exception e){
                    logger.warn("Error while handling packet for client " + manager.getRemoteAddress(), e);
                    final ChatComponentText msg = new ChatComponentText("Internal server error");
                    manager.sendPacket(new S40PacketDisconnect(msg), new ChannelFutureListener() {
                        @Override
                        public void operationComplete(ChannelFuture channelFuture) throws Exception {
                            manager.closeChannel(msg);
                        }
                    });
                    manager.disableAutoRead();
                }
            }
        }
    }
}
项目:DecompiledMinecraft    文件:NetworkSystem.java   
/**
 * Will try to process the packets received by each NetworkManager, gracefully manage processing failures and cleans
 * up dead connections
 */
public void networkTick()
{
    synchronized (this.networkManagers)
    {
        Iterator<NetworkManager> iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.hasNoChannel())
            {
                if (!networkmanager.isChannelOpen())
                {
                    iterator.remove();
                    networkmanager.checkDisconnected();
                }
                else
                {
                    try
                    {
                        networkmanager.processReceivedPackets();
                    }
                    catch (Exception exception)
                    {
                        if (networkmanager.isLocalChannel())
                        {
                            CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                            CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                            crashreportcategory.addCrashSectionCallable("Connection", new Callable<String>()
                            {
                                public String call() throws Exception
                                {
                                    return networkmanager.toString();
                                }
                            });
                            throw new ReportedException(crashreport);
                        }

                        logger.warn((String)("Failed to handle packet for " + networkmanager.getRemoteAddress()), (Throwable)exception);
                        final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                        networkmanager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
                        {
                            public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
                            {
                                networkmanager.closeChannel(chatcomponenttext);
                            }
                        }, new GenericFutureListener[0]);
                        networkmanager.disableAutoRead();
                    }
                }
            }
        }
    }
}
项目:DecompiledMinecraft    文件:NetworkSystem.java   
/**
 * Will try to process the packets received by each NetworkManager, gracefully manage processing failures and cleans
 * up dead connections
 */
public void networkTick()
{
    synchronized (this.networkManagers)
    {
        Iterator<NetworkManager> iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.hasNoChannel())
            {
                if (!networkmanager.isChannelOpen())
                {
                    iterator.remove();
                    networkmanager.checkDisconnected();
                }
                else
                {
                    try
                    {
                        networkmanager.processReceivedPackets();
                    }
                    catch (Exception exception)
                    {
                        if (networkmanager.isLocalChannel())
                        {
                            CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                            CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                            crashreportcategory.addCrashSectionCallable("Connection", new Callable<String>()
                            {
                                public String call() throws Exception
                                {
                                    return networkmanager.toString();
                                }
                            });
                            throw new ReportedException(crashreport);
                        }

                        logger.warn((String)("Failed to handle packet for " + networkmanager.getRemoteAddress()), (Throwable)exception);
                        final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                        networkmanager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
                        {
                            public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
                            {
                                networkmanager.closeChannel(chatcomponenttext);
                            }
                        }, new GenericFutureListener[0]);
                        networkmanager.disableAutoRead();
                    }
                }
            }
        }
    }
}
项目:DecompiledMinecraft    文件:NetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
public void handleDisconnect(S40PacketDisconnect packetIn)
{
    this.netManager.closeChannel(packetIn.getReason());
}
项目:BaseClient    文件:NetworkSystem.java   
/**
 * Will try to process the packets received by each NetworkManager, gracefully manage processing failures and cleans
 * up dead connections
 */
public void networkTick()
{
    synchronized (this.networkManagers)
    {
        Iterator<NetworkManager> iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.hasNoChannel())
            {
                if (!networkmanager.isChannelOpen())
                {
                    iterator.remove();
                    networkmanager.checkDisconnected();
                }
                else
                {
                    try
                    {
                        networkmanager.processReceivedPackets();
                    }
                    catch (Exception exception)
                    {
                        if (networkmanager.isLocalChannel())
                        {
                            CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                            CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                            crashreportcategory.addCrashSectionCallable("Connection", new Callable<String>()
                            {
                                public String call() throws Exception
                                {
                                    return networkmanager.toString();
                                }
                            });
                            throw new ReportedException(crashreport);
                        }

                        logger.warn((String)("Failed to handle packet for " + networkmanager.getRemoteAddress()), (Throwable)exception);
                        final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                        networkmanager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
                        {
                            public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
                            {
                                networkmanager.closeChannel(chatcomponenttext);
                            }
                        }, new GenericFutureListener[0]);
                        networkmanager.disableAutoRead();
                    }
                }
            }
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
public void handleDisconnect(S40PacketDisconnect packetIn)
{
    this.netManager.closeChannel(packetIn.getReason());
}
项目:BaseClient    文件:NetworkSystem.java   
/**
 * Will try to process the packets received by each NetworkManager, gracefully manage processing failures and cleans
 * up dead connections
 */
public void networkTick()
{
    synchronized (this.networkManagers)
    {
        Iterator<NetworkManager> iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.hasNoChannel())
            {
                if (!networkmanager.isChannelOpen())
                {
                    iterator.remove();
                    networkmanager.checkDisconnected();
                }
                else
                {
                    try
                    {
                        networkmanager.processReceivedPackets();
                    }
                    catch (Exception exception)
                    {
                        if (networkmanager.isLocalChannel())
                        {
                            CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                            CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                            crashreportcategory.addCrashSectionCallable("Connection", new Callable<String>()
                            {
                                public String call() throws Exception
                                {
                                    return networkmanager.toString();
                                }
                            });
                            throw new ReportedException(crashreport);
                        }

                        logger.warn((String)("Failed to handle packet for " + networkmanager.getRemoteAddress()), (Throwable)exception);
                        final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                        networkmanager.sendPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener < Future <? super Void >> ()
                        {
                            public void operationComplete(Future <? super Void > p_operationComplete_1_) throws Exception
                            {
                                networkmanager.closeChannel(chatcomponenttext);
                            }
                        }, new GenericFutureListener[0]);
                        networkmanager.disableAutoRead();
                    }
                }
            }
        }
    }
}
项目:BaseClient    文件:NetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
public void handleDisconnect(S40PacketDisconnect packetIn) {
    this.netManager.closeChannel(packetIn.getReason());
}
项目:Resilience-Client-Source    文件:NetworkSystem.java   
/**
 * Will try to process the packets received by each NetworkManager, gracefully manage processing failures and cleans
 * up dead connections
 */
public void networkTick()
{
    List var1 = this.networkManagers;

    synchronized (this.networkManagers)
    {
        Iterator var2 = this.networkManagers.iterator();

        while (var2.hasNext())
        {
            final NetworkManager var3 = (NetworkManager)var2.next();

            if (!var3.isChannelOpen())
            {
                var2.remove();

                if (var3.getExitMessage() != null)
                {
                    var3.getNetHandler().onDisconnect(var3.getExitMessage());
                }
                else if (var3.getNetHandler() != null)
                {
                    var3.getNetHandler().onDisconnect(new ChatComponentText("Disconnected"));
                }
            }
            else
            {
                try
                {
                    var3.processReceivedPackets();
                }
                catch (Exception var8)
                {
                    if (var3.isLocalChannel())
                    {
                        CrashReport var10 = CrashReport.makeCrashReport(var8, "Ticking memory connection");
                        CrashReportCategory var6 = var10.makeCategory("Ticking connection");
                        var6.addCrashSectionCallable("Connection", new Callable()
                        {
                            private static final String __OBFID = "CL_00001450";
                            public String call()
                            {
                                return var3.toString();
                            }
                        });
                        throw new ReportedException(var10);
                    }

                    logger.warn("Failed to handle packet for " + var3.getSocketAddress(), var8);
                    final ChatComponentText var5 = new ChatComponentText("Internal server error");
                    var3.scheduleOutboundPacket(new S40PacketDisconnect(var5), new GenericFutureListener[] {new GenericFutureListener()
                        {
                            private static final String __OBFID = "CL_00001451";
                            public void operationComplete(Future p_operationComplete_1_)
                            {
                                var3.closeChannel(var5);
                            }
                        }
                    });
                    var3.disableAutoRead();
                }
            }
        }
    }
}
项目:Resilience-Client-Source    文件:NetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
public void handleDisconnect(S40PacketDisconnect p_147253_1_)
{
    this.netManager.closeChannel(p_147253_1_.func_149165_c());
}
项目:Cauldron    文件:NetworkSystem.java   
public void networkTick()
{
    List list = this.networkManagers;

    synchronized (this.networkManagers)
    {
        // Spigot Start
        // This prevents players from 'gaming' the server, and strategically relogging to increase their position in the tick order
        if (org.spigotmc.SpigotConfig.playerShuffle > 0 && MinecraftServer.currentTick % org.spigotmc.SpigotConfig.playerShuffle == 0)
        {
            Collections.shuffle(this.networkManagers);
        }

        // Spigot End
        Iterator iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.isChannelOpen())
            {
                iterator.remove();

                if (networkmanager.getExitMessage() != null)
                {
                    networkmanager.getNetHandler().onDisconnect(networkmanager.getExitMessage());
                }
                else if (networkmanager.getNetHandler() != null)
                {
                    networkmanager.getNetHandler().onDisconnect(new ChatComponentText("Disconnected"));
                }
            }
            else
            {
                try
                {
                    networkmanager.processReceivedPackets();
                }
                catch (Exception exception)
                {
                    if (networkmanager.isLocalChannel())
                    {
                        CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                        CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                        crashreportcategory.addCrashSectionCallable("Connection", new Callable()
                        {
                            private static final String __OBFID = "CL_00001450";
                            public String call()
                            {
                                return networkmanager.toString();
                            }
                        });
                        throw new ReportedException(crashreport);
                    }

                    logger.warn("Failed to handle packet for " + networkmanager.getSocketAddress(), exception);
                    final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                    networkmanager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener[] {new GenericFutureListener()
                    {
                        private static final String __OBFID = "CL_00001451";
                        public void operationComplete(Future p_operationComplete_1_)
                        {
                            networkmanager.closeChannel(chatcomponenttext);
                        }
                    }
                                                                                                  });
                    networkmanager.disableAutoRead();
                }
            }
        }
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleDisconnect(S40PacketDisconnect p_147253_1_)
{
    this.netManager.closeChannel(p_147253_1_.func_149165_c());
}
项目:Cauldron    文件:NetworkSystem.java   
public void networkTick()
{
    List list = this.networkManagers;

    synchronized (this.networkManagers)
    {
        Iterator iterator = this.networkManagers.iterator();

        while (iterator.hasNext())
        {
            final NetworkManager networkmanager = (NetworkManager)iterator.next();

            if (!networkmanager.isChannelOpen())
            {
                iterator.remove();

                if (networkmanager.getExitMessage() != null)
                {
                    networkmanager.getNetHandler().onDisconnect(networkmanager.getExitMessage());
                }
                else if (networkmanager.getNetHandler() != null)
                {
                    networkmanager.getNetHandler().onDisconnect(new ChatComponentText("Disconnected"));
                }
            }
            else
            {
                try
                {
                    networkmanager.processReceivedPackets();
                }
                catch (Exception exception)
                {
                    if (networkmanager.isLocalChannel())
                    {
                        CrashReport crashreport = CrashReport.makeCrashReport(exception, "Ticking memory connection");
                        CrashReportCategory crashreportcategory = crashreport.makeCategory("Ticking connection");
                        crashreportcategory.addCrashSectionCallable("Connection", new Callable()
                        {
                            private static final String __OBFID = "CL_00001450";
                            public String call()
                            {
                                return networkmanager.toString();
                            }
                        });
                        throw new ReportedException(crashreport);
                    }

                    logger.warn("Failed to handle packet for " + networkmanager.getSocketAddress(), exception);
                    final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
                    networkmanager.scheduleOutboundPacket(new S40PacketDisconnect(chatcomponenttext), new GenericFutureListener[] {new GenericFutureListener()
                    {
                        private static final String __OBFID = "CL_00001451";
                        public void operationComplete(Future p_operationComplete_1_)
                        {
                            networkmanager.closeChannel(chatcomponenttext);
                        }
                    }
                                                                                                  });
                    networkmanager.disableAutoRead();
                }
            }
        }
    }
}
项目:Cauldron    文件:NetHandlerPlayClient.java   
public void handleDisconnect(S40PacketDisconnect p_147253_1_)
{
    this.netManager.closeChannel(p_147253_1_.func_149165_c());
}
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
void handleDisconnect(S40PacketDisconnect packetIn);
项目:DecompiledMinecraft    文件:INetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
void handleDisconnect(S40PacketDisconnect packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
void handleDisconnect(S40PacketDisconnect packetIn);
项目:BaseClient    文件:INetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
void handleDisconnect(S40PacketDisconnect packetIn);
项目:Resilience-Client-Source    文件:INetHandlerPlayClient.java   
/**
 * Closes the network channel
 */
void handleDisconnect(S40PacketDisconnect var1);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleDisconnect(S40PacketDisconnect p_147253_1_);
项目:Cauldron    文件:INetHandlerPlayClient.java   
void handleDisconnect(S40PacketDisconnect p_147253_1_);