-
Notifications
You must be signed in to change notification settings - Fork 140
Permission schedules
With permission schedules you can set up rules to turn some permissions into a ON or OFF state, depending on the current (real / MC) time or delays.
You can define permission schedules currently only by configuring them in
<world-dir>/FEData/json/PermissionSchedule/<schedule-name>.json.
Time is measured as seconds (isRealTime = true) or in minecraft ticks (isRealTime = false).
If isDelay = false, the times are always absolute values since midnight (real / minecraft).
The permissions always start with the ON state on midnight.
Example:
isRealTime = true
isDelay = false
times[0] = 28800
times[1] = 57600
This will turn the permissions ON from midnight until 8:00, OFF until 16:00 and again ON until midnight.
If isDelay = true makes the times not absolute, but turns them into delays instead.
Example:
isRealTime = true
isDelay = true
times[0] = 5
times[1] = 10
This will repeatedly turn the permissions to ON for 5 seconds and then to OFF for 10 seconds.
If set, onMessage and offMessage are broadcasted on the server, when the permissions change.
Full example:
{
"isRealTime": true,
"isDelay": false,
"zoneId": 1,
"group": "_ALL_",
"onMessage": "Turned permissions ON",
"offMessage": "Turned permissions OFF",
"times": [
9960,
10020
],
"permissions": {
"some.test.permission": {
"on": "true",
"off": "false"
},
"some.test.property": {
"on": "10",
"off": "70"
}
}
}