Skip to content

Command Structure

Ontey6 edited this page Nov 4, 2025 · 2 revisions

Full 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: {}

All Fields

Section Name

type: section/ccmd

path: ''

description: The ccmd's command name, lower priority than the Command Name

Command Name

type: string

path: 'command'

description: Overrides the Section Name

Namespace

type: string

path: 'namespace'

description: The command's namespace

Description

type: listable

path: 'description'

description: The command's description

Usage

type: listable

path: 'usage'

description: The command's usage

Permission

type: string

path: 'permission'

description: The command's description

Permission Required

type: boolean

path: 'permission-required'

description: Whether players need a permission to run this command

Aliases

type: listable

path: 'aliases'

description: The command's aliases; commands that do the exact same as this one

Args

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'

Tab

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'

Default Tab

type: enum / listable

path: 'no-tab'

description: The tab completions when none are set. can be PLAYERS, NONE or a custom listable

Condition

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.

Condition Error

type: listable

path: 'condition-error'

description: A message that is sent if the condition isn't true

Warmup

type: int

path: 'warmup'

description: A delay before the command is executed

Cooldown

type: int

path: 'cooldown'

description: A delay before being able to run the command again

Replacements

type: section

path: 'replacements'

description: Text that is replaced in commands/messages...

Language

type: section

path: 'language'

description: A language section similar to the one in the config. Some fields are unused in commands.

Message

type: listable

path: 'message'

description: A message sent to the sender

Normal Broadcast

type: listable

path: 'broadcast'

description: A broadcast set to all players

Advanced Broadcast

type: section / advanced broadcast

path: 'broadcast'

description: A broadcast sent to players who match requirements

Commands

type: listable

path: 'commands'

description: A listable of commands to be run on execution

Url Call

type: section / url call

path: 'url-call'

description: Calls and gets a response from a URL

Signatures

type: section / signatures section

path: 'signatures'

description: adds command signatures detected by regex that can all do something different

Clone this wiki locally