It works, thanks, but the event "PlayerLoggedInEvent" is not launched, I probe it using the chat event to check and that way it works, but I want to detect when it enters a server or even a world (single player)
ServerLifecycleHooks.getCurrentServer();
Returns null values if the player is on a multiplayer server