Auto Server Restart

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
User avatar
Mwthorn
User
User
Posts: 45
Joined: August 6th, 2016, 8:35 am
Location: Roskilde, Sjælland, Denmark
Contact:

Auto Server Restart

Post by Mwthorn » November 3rd, 2019, 4:15 pm

This script automatically restarts the server at 5 AM local server time and warns players 1 hour before.
This is mainly just an example on how to make an event with Denizen.

Instructions:

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 228
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: Auto Server Restart

Post by mcmonkey » November 4th, 2019, 5:07 am

This is very similar to a sample script in the guide: https://guide.denizenscript.com/guides/ ... th-denizen

With a notable difference that you included save instructions, which is actually considered erroneous to include. The server saves itself at shutdown time - saving Denizen/Citizens manually first is redundant, and "save-all" is actually potentially a problem on some servers (most servers have worlds configured to auto-save as-needed, rather than only all at once by command - some servers actually have worlds configured to not save, at which point save-all ignores that setting and breaks things).
Denizen lead developer.
http://mcmonkey.org

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest