World Reset When No Players

Discussion in 'Archived: Plugin Requests' started by x128, Jul 27, 2013.

  1. Offline


    Plugin category: Admin

    Suggested name: EmptyReset

    What I want: I would like a simple plugin that when no players are in a world, it erases the world file and replaces it with a predefined world. This should work for multiple different worlds. Inside the "EmptyReset" folder, there is a config file as well as a "Worlds" folder. The worlds folder is where you place the untouched worlds to get copied when a world gets reset. The config should look something like this:

    #Default configuration for EmptyReset
    #Format worlds to get reset when empty as shown below
    # world_folder_in_root_directory,world_folder_in_EmptyReset_worlds_folder


    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions are needed for this plugin

    When I'd like it by: As soon as possible :)

    If you need any more information, or don't even know what the hell I am talking about, please let me know :)
  2. Offline


    What do you mean by "pre-defined world"?
  3. Offline


    For this example we will pretend the config states derpworld1,cleanderp
    As soon as all players leave the world derpworld1, the world derpworld1 will be deleted from the server, and cleanderp would be copied to the root server folder and also renamed derpworld1.
  4. Offline


    x128 I would give it a go but I have never deleted worlds before in Bukkit. The rest of the plugin would be a piece of cake.
  5. Offline


    I have another plugin that deletes a player.dat file when the player disconnects. You might be able to use some of this code for this plugin. Here is the forum thread.
  6. Offline

    timtower Moderator Moderator

    Use the File class, comes with java itself
  7. Offline


    x128 Wait doesn't that Plugin do almost the exact same thing as that one?

    EDIT: Oh wait sorry, I re-read. That one deletes players' dat file. However that did actually help. I will try making this. Do you want me to put it on

    Wait is derpworld1, derpworld2, ect. all actual worlds that you have already have. Or can it be made so that it just makes a new world randomly once there are no players online?

    Nvm I dont think you can delete worlds while server is Enabled.

    Maybe someone a little more experienced/advanced would take on this?

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


    A better idea would be to make a plugin that deletes map on shutdown, then look up a way to have the server automatically start up (there's a tool for this, I believe), then just regenerate that world on startup, all when no one is on.

Share This Page