reset world help

Discussion in 'Plugin Development' started by orjacob555, Sep 19, 2020.

  1. Offline


    I want to reset the game world and I am not succeeding despite all the solutions I have found.
    Anyone know maybe how exactly to reset the world?
  2. Offline

    timtower Moderator Moderator

    @orjacob555 If not the main world: unload and delete, then generate a new one.
  3. Offline



    I will explain better.
    I make a game that has a basic arena and they build all sorts of things and I have to bring the world back to how it looked before and I realized that you can make a new world and copy it and load it but nothing works for me.
    I tried to duplicate the world in two folders. One is the world that the server loads and the other is the world in its original form but it is not loaded.
    I thought to try that at the end of the game delete the files in the world that the server uploaded and copy the files that are in the world that I never uploaded that the server uploaded but it did not work.
    It's about the same as in Bed Wars, Sky Wars and more
    Last edited: Sep 19, 2020
  4. Offline


    Your plugin tester world? Go into your server file and find the three files called world, world_nether, world_the_end, and delete all those, then just run your server like normal and it will generate a brand new world. At least it did for me.
  5. Offline


    But that's not what I want ...
    Suppose in Bed Wars at first we see the map properly and after everyone plays in it and puts blocks in it it resets is what I want to do.
  6. Offline


    If you use schematics, reload them. I heard it'd be quicker and simpler for small maps like BedWars or SkyWars (hehe my favorite game) maps.

    If you use worlds, have a copy of the map as template. Unload the world that needs resetting. Copy template files over to that folder, delete uid.dat if needed and then create the world with the name of the folder. WorldCreator's constructor accepts a String, which will be the name of the folder.

    That's two ways I know how to copy/reset worlds.
    Hope I made sense.
  7. Offline


    If you can send the code i will be happy :)
  8. Offline


Share This Page