Plugin Help [Is it possible] Stop a restart/reload during a certain time of day

Discussion in 'Plugin Help/Development/Requests' started by sgavster, Apr 28, 2015.

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

    sgavster

    As the title says, I want to make it so the server can not be interupted from a certain time to a certain time. If this is possible and you know how, please let me know!
     
  2. Offline

    metmad22

    @sgavster

    I believe you could do this with most hosts within your FTP client.

    If you really want to make this using code, you might be able to achieve this by tracking the date. Create a Date with java. Check if the time matches the one you need. You can use .shutdown() to stop the server & .reload() to reload your server. ( Bukkit.getServer().reload()/.shutdown() ).

    Creating the date is a simple java code.
     
  3. Offline

    sgavster

    @metmad22 I created a time class, but I want to make it so it can't restart during a certain time, as it would mess up my game.
     
  4. Offline

    metmad22

    @sgavster
    Would it be possible to see your time class and tell me when you want it to reload?

    You can actually use a runnable to delay the task. Make it a command in-game and start the timer when it's the time you want in-game. Set your delay to be 24 hours, and it would do what you wish. That's an other option you could try.
     
Thread Status:
Not open for further replies.

Share This Page