Use PreLoginEvent instead of old PlayerHandshakeEvent.