In Nucleus, most Nucleus commands can be assigned a warmup and cooldown, and a cost, which can be done on a global basis, or on a per player/permission group basis with a compatible permission plugin. All Nucleus root commands can also be disabled.
In the Nucleus config directory, there is a file, commands.conf
. In this file, every Nucleus command has an entry, like so:
home {
# Time, in seconds, that a player has to wait between uses of this command. Set to 0 to disable.
cooldown=10
# Cost of a command that a player has to pay to use the command. The cost will only be deducted if successful. Set to 0 to disable.
cost=0
# Sets whether a command is enabled.
enabled=true
# Time, in seconds, that a player has to wait without moving or using other commands before their command will execute. Set to 0 to disable.
warmup=0
}
For a subcommand, the key will be a period separated path, so for /mail send
, look for mail.send
:
"mail.send" {
# Time, in seconds, that a player has to wait between uses of this command. Set to 0 to disable.
cooldown=0
# Cost of a command that a player has to pay to use the command. The cost will only be deducted if successful. Set to 0 to disable.
cost=0
# Time, in seconds, that a player has to wait without moving or using other commands before their command will execute. Set to 0 to disable.
warmup=0
}
Setting warmups, cooldowns and costs globally is as simple as setting the options in this file.
Players can be exempted from these effects using permissions. If the command permission is nucleus.home.base
, the exemption permission is:
nucleus.home.exempt.cooldown
for cooldownsnucleus.home.exempt.warmup
for warmupnucleus.home.exempt.cost
for costsIn other words, take base
off the permission, and add exempt.()
.
Some commands have command aliases that can be disabled. Such commands, like /message
, have config sections like this:
message {
aliases {
tell=true
}
# Time, in seconds, that a player has to wait between uses of this command. Set to 0 to disable.
cooldown=0
# Cost of a command that a player has to pay to use the command. The cost will only be deducted if successful. Set to 0 to disable.
cost=0
# Sets whether a command is enabled.
enabled=true
# Time, in seconds, that a player has to wait without moving or using other commands before their command will execute. Set to 0 to disable.
warmup=0
}
The aliases can be turned on or off in the <command>.aliases.<cmd>
config path, but will require a server restart to take effect.
If you use a compatible permission plugin, you can use options/meta to set the warmups, cooldowns and costs. Options override the commands.conf
file.
The permission option that needs to be set is:
nucleus.<command>.warmup
for warmupsnucleus.<command>.cooldown
for cooldownsnucleus.<command>.cost
for costIn this case, <command>
is the same as the config key in commands.conf
, so to set the warmup on the /mail send
command, set the option nucleus.mail.send.warmup
.
The command for common permission plugins to set these options are:
Exemption permission will bypass options.