I looked through GitHub a bit, but I can’t find a “PlayerChangeWorldEvent,” does anyone know the equivalent event, or a way I can monitor this kind of action?
I believe this should fall under DisplaceEntityEvent.Teleport
- you can use getFromTransform
/getToTransform
to check if the teleport is between worlds, and getCause().first(Player.class)
to check if it’s a player that was teleported.
Yeah… thanks, I’ll use that for now. But wouldn’t I want to use DisplaceEntityEvent.Teleport.TargetPlayer instead of checking the causes?
If you desire it purely for players, yes.