Rewrote logic in ServerTickHandler