-
Notifications
You must be signed in to change notification settings - Fork 0
Command Structure
A structure with the default paths. (v2.0)
<command_name>:
# metadata
command: '<command_name>' # default: section name
namespace: '<namespace>' # default: set in config defaults
description: '<description>' # default: set in config defaults
usage: '<usage>' # default: set in config defaults
permission: '<permission>' # default: set in config defaults
permission-required: true # default: true
aliases: []
args: {}
tab: {}
no-tab: players # default: set in config
condition: '<condition>'
condition-error: '<condition_error>'
warmup: 10 # default: 0
cooldown: 10 # default: 0
replacements:
name: '<replacement>'
language: {}
# actions
message: '<message>'
broadcast: '<broadcast>' # normal broadcast
broadcast: # advanced broadcast
range: 10 # default: -1
include-sender: true # default: true
include-console: false # default: false
permission: '<permission>'
condition: '<condition>'
broadcast: '<broadcast>'
commands: '<command>'
url-call:
url: '<url>'
user-agent: '<user_agent>'
json-path: '<json-path>'
after: {}
# Misc
signatures:
<ignored_name>:
regex: '<regex>'
command: {}type: section/ccmd
path: ''
description: The ccmd's command name, lower priority than the Command Name
type: string
path: 'command'
description: Overrides the Section Name
type: string
path: 'namespace'
description: The command's namespace
type: listable
path: 'description'
description: The command's description
type: listable
path: 'usage'
description: The command's usage
type: string
path: 'permission'
description: The command's description
type: boolean
path: 'permission-required'
description: Whether players need a permission to run this command
type: listable
path: 'aliases'
description: The command's aliases; commands that do the exact same as this one
type: empty list / numbered section
path: 'args'
description: The possible arguments that the user can type after the command. Default behavior restricts args
example
args:
1:
- 'gold'
- 'iron'
- 'copper'
2: player # typed argument
3:
- 'set'
- 'get'type: numbered section
path: 'tab'
description: The tab completions at different arguments
example
tab:
1: args # type (reflects the args at that position)
2: players # type
3:
- 'set'
- 'get'type: enum / listable
path: 'no-tab'
description: The tab completions when none are set. can be PLAYERS, NONE or a custom listable
type: listable
path: 'condition'
description: One or multiple conditions that have to be true in order for the command to execute. otherwise the condition-error is sent.
type: listable
path: 'condition-error'
description: A message that is sent if the condition isn't true
type: int
path: 'warmup'
description: A delay before the command is executed
type: int
path: 'cooldown'
description: A delay before being able to run the command again
type: section
path: 'replacements'
description: Text that is replaced in commands/messages...
type: section
path: 'language'
description: A language section similar to the one in the config. Some fields are unused in commands.
type: listable
path: 'message'
description: A message sent to the sender
type: listable
path: 'broadcast'
description: A broadcast set to all players
type: section / advanced broadcast
path: 'broadcast'
description: A broadcast sent to players who match requirements
type: listable
path: 'commands'
description: A listable of commands to be run on execution
type: section / url call
path: 'url-call'
description: Calls and gets a response from a URL
type: section / signatures section
path: 'signatures'
description: adds command signatures detected by regex that can all do something different