-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
World reload causes worlds in location variables to not work correctly until restart #1144
Comments
Putting this here for reference. I talked about this in #1020 but this is not a duplicate issue. It's been known in the Skript community for awhile. It's mainly the users issue but it would be nice to have a feature to get rid of those un-used world variables. The main problem (And I think Njol knew this) is that the world could have been unloaded (in your case) or deleted by mistake and so then the user goes to re-add the world. When they re-add the world, they realize the world variables were deleted and they're like wtf? I think Njol did this so that he could keep the users data. No one wants to have all their data reset to then have to re-add it all again. A option to clean the variable database would be nice though, which is highlighted in the other issue I just referenced. In your case I suggest setting local variables of the location if you unload/load the world constantly. You can do so by using the
Example usage:
You can also check out an addon I made to handle the main problems that Skript has with worlds https://github.com/TheLimeGlass/skript-world Source code of this internal function if interested: https://github.com/bensku/Skript/blob/8e17c858f6f3ee11942390675b94f0dd07b11103/src/main/java/ch/njol/skript/classes/data/DefaultFunctions.java#L305-L320 |
Thanks for the detailed info @TheLimeGlass. I agree it would be nice to fix this, but I imagine it only affects most users pretty rarely. |
From #341: Worlds that are not loaded before Skript is initialized cannot be accessed properly |
Yup |
When #4408 is merged, this issue will be fixed with #3971 (comment) |
this has been a bug in Skript for a while, it would be nice if it would get fixed.
example:
you go to a world which isn't the main world, but an additional world created by world management plugins like Multiverse-Core or some other
you use !set {spawn} to location of player
then you unload and load back that world and do !teleport player to {spawn}, it will teleport to that location, but in the main server's world, not the one in which you set it
it can be fixed if you use !set world of {spawn} to "%world of {spawn}%" parsed as a world or if you restart the server it also gets fixed
it would be nice if it wouldn't break with world reloads, because I reload worlds for world resetting
The text was updated successfully, but these errors were encountered: