Jump to content

Location variables in uploaded worlds don't save


Ofus-Will

Recommended Posts

It would appear that location variables in uploaded worlds (ones prefixed with "ul_") do not persist over restarts.

 

command /setspawn:
	trigger:
		set {location::spawn} to location of player

on join:
	teleport player to {location::spawn}

if i execute /setspawn and relog it works just fine. However when i restart the server, the location variable outputs <none> in a debug message

 

After this method didn't work, i tried doing

on join:
	teleport player to location at 1, 5, 1 in "ul_world"

and that did not work after restart either

 

I assumed it was something to do with skript loading before the uploaded world did, so the identifier of the world was nullified, consequently so was the expression.

 

Another method I tried was 

on join:
	teleeport player to location at 1, 5, 1 in "ul_world"

on world load:
	if event-world = "ul_world":
		execute console command "sk reload Join"

Therefore when the world is loaded in by the server, the script will be reloaded with the world "ul_world" now actually being recognised by the location at expression. Unfortunately, this did not fix anything, presumably due to the on world load event only being triggered by a player teleporting to the world, not the server

as a last ditch, messy effort I tried

on script load:
	wait 30 seconds
	execute console command "sk reload scripts"

on join:
		teleport player to location at 1, 5, 1 in "ul_world"

still to no prevail

 

ideally, i would rather only have my ul_world and no other world, but the generator settings to not seem to be validating the void world custom generation. If minehut users had access to server.properties i believe we would be able to change the level-name variable to our desired world and that would be sufficient, but obviously we don't have access to that. Is there anyway of changing the main world of the server to a void world?

note: I do not wish to use multiverse, before anyone suggests this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...