You are browsing as a guest.
Login | Register
~ mcmonkey's simpler pastebin ~ Inspired by Hastebin ~ home page ~ Denizen help ~
click to use the normal pastebin instead ~ Click to make your own paste ~ click to duplicate and edit this paste


Title:
Type:
Date:
By:
Raw:
Other:
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
3300

Auto Server Restart v3
Denizen Script
2019/11/03 16:17:06 UTC-08:00
Guest
Click here to view this paste as a raw text file | Or download the script


### Auto Server Restart
# by Mwthorn (Discord: Mwthorn#2843) (Mail: mwthorn@gmail.com)
# Ask for help at any time on the Official Denizen Script Discord: https://discord.gg/Q6pZGSR
# 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:
# - Place the script in your script folder.
# - Restart server or reload scripts
# - Done!

AutoServerRestart_Events:
    type: world
    debug: false
    events:
        on system time 04:00:
        - announce "<&7>Restarting server in 1 hour."
        - wait 30m
        - announce "<&7>Restarting server in 30 minutes."
        - wait 20m
        - announce "<&7>Restarting server in 10 minutes."
        - wait 9m
        - announce "<&7>Restarting server in 1 minute."
        - wait 49s
        - announce "<&7>Restarting server in 10 seconds."
        - wait 9s
        - announce "<&7>Saving and Restarting..."
        - adjust <server> save
        - adjust <server> save_citizens
        - execute as_server "save-all"
        - wait 3s
        - adjust <server> restart