Configuration Command Descriptions:
1. setBorder(size, x, y, duration)
- Sets the world border's size and transitions it to the specified size at coordinates (x, y) over the given duration (in seconds).
- Example: setBorder(1000, 0, 0, 60) will set the border to a radius of 1000 at coordinates (0, 0) over 60 seconds.
2. setTime(time)
- Sets the in-game time to the specified value (in ticks).
- Example: setTime(12000) will set the time to midday (12000 ticks).
3. setGamemode(mode)
- Sets the game mode for all players to the specified mode.
- The mode can be one of the following: SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR.
- Example: setGamemode(CREATIVE) will set all players' game mode to Creative.
4. tpAll(x, z)
- Teleports all players to the specified coordinates (x, z) on the map.
- Example: tpAll(100, 200) will teleport all players to coordinates (100, 200).
5. randomBorder(size, time)
- Sets a random world border location within 100 blocks of the current border's center and transitions it to the given size over the specified time (in seconds).
- Example: randomBorder(500, 30) will create a random border of radius 500 and transition it within 30 seconds.
6. PVPOFF
- Disables PvP for all players.
- Example: PVPOFF disables PvP for all players in the zone.
7. PVPON
- Enables PvP for all players.
- Example: PVPON enables PvP for all players in the zone.
8. sendChallengeMessage(message)
- Sends a challenge message to all players in the game.
- Example: sendChallengeMessage("New challenge: Complete the parkour!") sends the given message to all players.
9. Freeze
- Freezes all players.
- cant move/interact/take damage etc.
10. UnFreeze
- Unfreezes all players
Usage Example in Zone Configuration:
{
"zones": {
"GO": {
"start": "0s 1ms",
"functions": [
"sendChallengeMessage(\"Start\")",
"setBorder(1000,0,0,0)",
"setTime(1000)",
"tpAll(0,0)",
"setGamemode(ADVENTURE)"
]
},
"resetGame": {
"start": "1h",
"functions": [
functions for the reset
]
}
}
}