-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
[CRITICAL] teleport {_player} to {_loc} DELETES ALL LOCAL VARIABLES! #3605
Comments
PR: #3478 |
If you're able to, please let me know if the build from that PR fixes your issue. @Govindass |
It should probably be documented that EffTeleport is now a delayed effect, as that has a big impact on plenty of scripts (breaking change) |
Line of execution isn't broken, the next TriggerItem still executes after all teleports have occurred and the chunk has been fully loaded (async on paper or sync on spigot) Skript/src/main/java/ch/njol/skript/effects/EffTeleport.java Lines 93 to 106 in da691e2
|
They are the same as before - the function can have delayed execution however the calling code will continue before the delayed code finishes + it can't be used as an expression anymore (or at least, the return value will always be none if the return comes after a delay) |
Making
The least that can be done is for it to be documented. |
@Govindass async teleport player |
Unless I am missing something here, I don't see the issue. Currently testing this on 1.12.2 (because Govindass I know you use that) function moveTo(p: player, w: world) :: world:
teleport {_p} to spawn of {_w}
return world of {_p}
command /world <world>:
trigger:
send "World before TP: &a%world of player%"
set {_w} to moveTo(player, arg-1)
send "World after TP: &b%{_w}%" Needless to say, it works totally fine for me. Prior to this change, when you used the teleport effect, the chunk was force loaded, if there was any delay in that chunk loading, the code after the teleport would all be delayed also, just like this is. So unless there is more info you can give us, I don't see any issue here. EDIT On that note, that issue is different than this one, and a new issue should be created so we can properly address it. |
That code shouldn't even parse, but the trigger isn't marked as delayed in the init section (which is also a bug with My suggestion is making teleportation optionally async, as was suggested by #3355. |
Description
using teleport {_player} to {_loc}, when at the target location the chunks aren't loaded (but are generated), will delete all local variables in the code. (It may be 1.12.2 only bug, as it has no async teleportation)
Steps to Reproduce
<none>
Expected Behavior
To not delete local variables, as it was before.
Errors / Screenshots
None
Server Information
Additional Context
This is very likely caused by async teleportation update.
The text was updated successfully, but these errors were encountered: