pmdevita/StayPut

Teleporting to spawn instead of previous location (FULL ISSUE + TESTING)

Opened this issue · 3 comments

I have been doing lots of testing with Multiverse-Core and StayPut only, like them being the only plugins to use.

Yes, there is a strange bug that happens with StayPut. Once you teleport to one world, you go to your previous location like you're supposed to (this part is not the bug), but in some other worlds, instead, you teleport back to the spawn point. (<- this part is the bug.)

And I have found the main cause of this issue (In \Multiverse-Core\worlds.yml):

image

Depending on the set coordinates of the spawn location for the world, sometimes it messes with StayPut, and doesn't let it run in that world.
After changing it multiple times in some worlds, they are fixed and will now let you go back to your previous location, but I am unsure why this is the main cause.

The only manual way to fix this issue currently is just to change the world's spawn location in worlds.yml and hope that change works.

(Also, for some reason, changing the spawn point's Y value to somewhere in the sky fixes the issue. This is not recommended for survival worlds.)

The plugin needs to determine between "directed" and "undirected" teleports, that is, teleports with a specific destination in-world and teleports without. The Spigot API doesn't actually tell you whether a teleport is directed or not, the only way to tell is compare with the coordinates of the world spawn; if a teleport is going to world spawn, it was probably undirected.

To make things even more complicated, the world spawn may not actually be where Spigot says it is. Some plugins can change it without updating the world configuration, meaning you need to go ask them for the world spawn instead.

The solution is to do a bit more digging on how this all works and evaluate our solutions. I'll also add extra configuration options and documentation so users can fix this themselves.

Hello! i'm having this problem
I have 4 worlds, stayput works in 3 of them, whoever the 4th world is bugging a lil
how do i fix that?

edit:
i just did ./mv setspawn and it works now
no clue why but... i'll take that

@Note4037 Thank you very much! It really worked here and it solved my problem