This Rust plugin lets you run commands when players come in or out of safe zones, and also block certain commands from being executed within them.
Permissions
safezonecommands.ignore- Allows the player to use commands that are otherwise blocked in the safe zone.
Configuration
JSON:
{
"Version": "1.2.0",
"Safe Zones": [
{
"Monument Name": "compound",
"Blacklisted Commands": [
"kit",
"tp"
],
"Run Random Command ": false,
"Commands To Run": [
{
"Type": "Chat",
"Trigger": "Enter",
"Command": "Hello! {PlayerName} here, currently at {MonumentName} in grid {Grid} to recycle some items."
},
{
"Type": "Client",
"Trigger": "Leave",
"Command": "heli.calltome"
},
{
"Type": "Server",
"Trigger": "Enter",
"Command": "inventory.giveto {PlayerId} scrap 50"
}
],
"Enter Message": "Welcome to {MonumentName}, {PlayerName}!",
"Leave Message": "Goodbye, {PlayerName}. Hope you had a great time at {MonumentName}!"
}
]
}
Monument Name- The name of the monument that the safe zone belongs to. The following monuments have safe zones:- compound
- bandit_town
- fishing_village_a
- fishing_village_b
- fishing_village_c
- stables_a
- stables_b
Blacklisted Commands- A list of chat commands that are blocked within the safe zone.Run Random Command- If set totrue, only one random command from theCommands To Runlist is executed when the player enters or leaves the safe zone. Iffalse, all commands in the list are executed.Commands To Run- A list of commands that are executed when players enter or exist the safe zone.Type- The type of command to execute.Chat- Sends the command as a chat message.Server- Executes the command on the server.Client- Runs the command directly on the player's client.
Trigger- The event that triggers the command (EnterorLeave).Command- The command string to be executed, which can include placeholders such as{PlayerId},{MonumentName}, etc.
Enter MessageandLeave Message- Sends a message to the player when they enter or leave the safe zone. The same placeholders used in commands can also be included here.
Command Placeholders
Available placeholders for commands:{PlayerName}- The name of the player.{PlayerId}- The player's id.{MonumentName}- The monument the player has just entered or left.{PositionX},{PositionY},{PositionZ}- The player's coordinates.{Grid}- The player's grid location.
Localization
JSON:
{
"CommandBlocked": "You cannot use this command in the safe zone."
}