Switch player and NPC processing, NPCs get processed first.
All delayed tasks should be handled at the top.
There is no such thing as a "list of logical packets", all packets are handled in the first block of player processing. Nothing should be handled directly on the network threads. The rest of the structure looks good, although you really could flush all the players' packets out in the player/npc local update block, no need to re-iterate players multiple times.
Edit:
I'd also like to add that this is bollocks:
Because.. 1) You're restricting it to sleeping a minimum of 50ms even if the tick takes longer than 600ms, in which case it should be trying to catch up, you should never slow it down further.Code:long sleepTime = Math.max(50, Settings.GAME_TICK - lastCycleTime);
and 2) The overall mechanic will result in your average tick taking 600.5ms, not the 600ms you should be aiming for. I suggest using a single thread scheduled executor to achieve this, the scheduleAtFixedRate method takes care of the time fluctuating, so your ticks will be more in lines of.. 600ms, 600.5ms, 599.5 ms etc. It will correct the previous tick's leftovers - or shortgoings with the next tick.








