Skip to content

Fix save_on_teleport_event does not work #817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

cgw2023
Copy link
Contributor

@cgw2023 cgw2023 commented Apr 28, 2025

The guard function of (!back.isSaveOnTeleportEvent() || back.canReturnToWorld(sourcePosition.getWorld())) logic looks strange. It means that when the setting is enable or the can be return, then setLastPosition will not be trigger.

This changes make sure save_on_teleport_event and can return to world both true then trigger the setLastPosition.

Tested in purpur-1.21.4-2408 release 4.9.5 cannot save vanilla TP for /back , with this commit it works.

Solve #813

Copy link
Owner

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much - good catch.

@WiIIiam278 WiIIiam278 merged commit 0a77eb0 into WiIIiam278:master Apr 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants