public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { ChatMessage chatmessage; if (throwable instanceof TimeoutException) { chatmessage = new ChatMessage("disconnect.timeout", new Object[0]); } else { chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable}); } this.close(chatmessage); }
public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { ChatMessage chatmessage; if (throwable instanceof TimeoutException) { chatmessage = new ChatMessage("disconnect.timeout", new Object[0]); } else { chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable}); } this.close(chatmessage); if (MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot }