CustomCommands allows you input some commands with your custom formats.
This is English document. Chinese one will be punished soon.
A Spigot or Bukkit Minecraft server.
It's empty.
PlaceholderAPI will be required after publish the next version.
All commands start with /ccs <config | run> <remain-arguments>
can be written to /ccs<c | r> <remain-arguments>
.
CCSC
means CustomCommandS Config
, and CCSR
means CustomCommandS Run
-
/ccs reload
reload all config for CustomCommands. -
/ccs version
show version of CustomCommands and some other message of this plugin. -
/ccs debug
enable or disable the debug mode. -
/ccsc <variable-name>
lookup variable<variable-name>
inconfig.yml
and show its value. -
/ccsc <variable-name> <set-to>
set variable<variable-name>
to<set-to>
. -
/ccsr <command-name> [arguments-list]
execute command<command-name>
designed incommands.yml
.
The default config.yml
is:
config:
# zhcn for Chinese, en for English
# Language system has not been finished yet _(:з」∠)_, so it'll cause nothing if you change this value.
lang: zhcn
# enable or disable debug mode.
debug: false
max-iterations: 10
Replacing valuable names to its actual value string can be recursive.
such as variable {remain}
, if its value = head {remain}
in the following situation:
action command format
: /say {remain}
, input: /.. head {remain}
result
: /say head head head ... head {remain}
the max-iterations
control the maximum times in iterations.
The default commands.yml
is:
commands:
# Permission to execute a command is: ccs.run.<command_name>
# (required)
# <command-name>:
pex-group-set:
# (required)
format: '{user_name} {group_name}'
# (required)
actions:
- 'pex user {user_name} group set {group_name}'
- 'broadcast {user_name} is a member of {group_name}.'
# (optional)
# identify: identify of action commands sender, is "auto" or "console".
# "auto" means the action commands sender is the same with ccsr command sender.
identify: console
# (optional)
# usage: '(a usage string)'
# (optional)
# var-nullable: true
# (optional)
# identify: console
Grammar to parser command inputted by command sender. You can define some variable in here, like: {variable_name}
.
A legal variable name should only consist of English alphas, digits and underlines, and it cannot starts with digit.
The {remain}
is a special variable: it's optional, can only appear at the end of format string when using it.
When parsing, all remain part of commands will be set to it, so the value of {remain}
can contains spaces.
commands will be executed after input correct command.
If there are some undeclared variable in action commands, it won't be replaced to a value.
WARNING CustomCommands allow you to input some ccsr command in actions, Sometime It maybe cause loops, which may make server show a lot of Exception message and shutdown. So in order to protect your server, you must design action commands carefully when they include a `/ccsr` command.
default value: /ccsr <command-name> <format-string>
.
default value in above case is '/ccsr pex-group-set {user_name} {group_name}'
A string describing usage of this command.
The usage will be send to command sender when he input a wrong command.
default value: false
.
If it set to `true`, there are many legal input format for same parsing format:
`parsing format`: {arg1} {arg2} {arg3}
`legal input formats`: `/ccsr `
| `/ccsr `
| `/ccsr `
| `/ccsr `
and some variable will be set to null in this case.
NOTICEvariable `{remain}` doesn't restricted.
default value: auto
.
identify of action commands sender, is `auto` or `console`. `auto` means the action commands sender is the same with ccsr command sender.
ccs.*
: Give players with op everything by default.ccs.version
: Permission to see version, name and other information of CustomCommands.ccs.debug
: Permission to enable or disable debug mode.ccs.reload
: Permission to reload all configurations.ccs.run.<command-name>
: Permission to execute a custom command.ccs.config.val.set
: set value of variable in config.ymlccs.config.val.look
: look value of variable in config.yml