Replacing world file

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

LoneElf

Active Member
Apr 30, 2017
165
2
18
24
Hi, I want to replace my normal "world" folder with a clean one every game. My thinking is I could create a folder in skript's directory somewhere, and place a clean, untouched "world" file in there. Then, if I run the command /new, it would replace the altered world file with the clean one in the skript folder, and restart the server. I've found a plugin that does this, but it only works 50% of the time which is a bit useless.

I've worked with editing files before with skript, but I'm assuming if I could replace the whole folder itself, that it would be most efficient, but maybe not.

I've searched the docs for this but couldn't find anything with "replacing" a folder with another folder.

This is kinda what I mean, but obviously this doesn't work:
Code:
command /new:
    trigger:
        replace folder in "C:\Users\Usern\Desktop\Server\world" with "../world"
        execute console command "restart"

If anyone could give me some suggestions for this, that would be great. Thanks!
 
Status
Not open for further replies.