Skip to content

teleportOnEveryLogin overwrites the previous world position#68

Description

@FidoScamander

Hi! First of all, we genuinely love EliteEssentials. It has become one of the essential mods in our server setup, and at this point it would be very difficult for us to run the server without it 馃槃

While testing EliteEssentials 2.0.10, we identified a small bug related to teleportOnEveryLogin.

In com.eliteessentials.listeners.JoinQuitListener, the SpawnOnLogout logic rewrites the native player profile after logout. Besides updating Components.Transform, Components.HeadRotation and Components.Player.PlayerData.World to the configured spawn world, it also writes the spawn coordinates into Components.Player.PlayerData.PerWorldData using the logout world key.

Because of this, if a player logs out from default_world, PerWorldData.default_world.LastPosition is replaced with the spawn coordinates. On the next login, the player correctly joins spawn_world, but returning to default_world through a portal sends them to those same numerical coordinates inside that world instead of their previous location.

We tested a minimal patch that writes the coordinates only to the configured spawn-world entry and leaves the logout world鈥檚 PerWorldData unchanged. Direct login at spawn still works, previous positions in other worlds are preserved, and /back is unaffected because it uses a separate history managed by BackService.

The issue therefore appears to be caused by the logout world name being used instead of the configured spawn world name during the PerWorldData update.

We wanted to report it because we care a lot about this mod and would love to see the fix included upstream. We can also share the patched JAR or the exact bytecode change if that helps. Thank you for all the work you put into EliteEssentials!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions