Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void channelInactive(ChannelHandlerContext ctx) throws Exception {
- try {
- Session session = ctx.attr(NetworkConstants.KEY).getAndRemove();
- if (session != null) {
- final Player player = (Player) session.getAttachment();
- if (player != null) {
- if (player.inCombat() || player.underAttackBy > 0 || player.underAttackBy2 > 0) {
- player.setXLogDelay(System.currentTimeMillis());
- }
- World.getWorld().queueLogout(player);
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement