Restoring a world help

Discussion in 'Plugin Development' started by CubixCoders, Jan 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    CubixCoders

    I am making a plugin where people like fight and blow up stuff, but i want the world to restore after the match, i have no idea how i would do this.. Any ideas? any would be helpful, also, please post code, just you telling me to do stuff wont help me since i have no idea how to do this.. THanks in advance :/
     
  2. Offline

    suckycomedian

    You might want to try making a plugin request
     
  3. Offline

    CubixCoders

    I need to implement it into my plugin though :/
     
  4. Offline

    suckycomedian

    I will work on it
     
  5. Offline

    CubixCoders

    I tried Bukkit.unloadWorld("test", false); trying to make it not save the world i change, but it didn't work, the world was saved :/

    Okay Update:
    Putting
    Code:java
    1.  
    2. Bukkit.unloadWorld(Bukkit.getWorld("test"), false);

    in onDisable then restarting the server made the server not save what i did, but it didn't work for onEnable.

    Nvm

    anything?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 8, 2016
  6. Offline

    suckycomedian

    Still making the plugin
     
  7. Offline

    Feindbild

    Two main possibilities:
    - store a list of all modified blocks and their original state, then restore the world from that list
    - make a hardcopy of the world files and restore them by copying over. might require a server restart but is more reliable
     
  8. Offline

    CubixCoders

    Could you show me how to do these with snippets?
     
  9. Offline

    Feindbild

    for #1 look into the MobArena code, which does this
    #2 would require a batch/bash script which restores the world folder on server exit and then starts it again
     
Thread Status:
Not open for further replies.

Share This Page