Restart Main World

Discussion in 'Plugin Development' started by Conkeegs, Aug 9, 2020.

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

    Conkeegs

    So I am pretty new to the plugin development world, and I'm just trying to create a small plugin for my friend and I that will stop the server (preferably), and restart the main world (the one specified in the server.properties file) as if no one has played on it. I've been made aware on several other threads that completely deleting the main world is impossible, but is there a way to restart it?
     
  2. Offline

    timtower Moderator Moderator

    @Conkeegs If you stop the server then you can just delete the folder that contains the world, then it will generate a new one.
    Doing it while the server is pretty much impossible.
     
  3. Offline

    Conkeegs

    Yeah, that's what I thought. It's weird though, (and I didn't attach a code file even though I should've), because in my plugin that I wrote, I told it to listen for a PlayerDeathEvent, get the world file, and delete every file inside of it, and then delete the world file itself. This works for the nether and the end, but works every OTHER time for the main world. I cannot comprehend why. It's like every other time that someone dies (and the server is restarted), the world is restarted.
     
Thread Status:
Not open for further replies.

Share This Page