> For the complete documentation index, see [llms.txt](https://smuddgge.gitbook.io/leaf-3.0.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smuddgge.gitbook.io/leaf-3.0.0/commands.md).

# Commands

## Command Format

{% code title="Example command" overflow="wrap" %}

```yaml
# [OPTIONAL] → Command Identifier
# You can remove any command from the configuration to disable it.
# The identifier will not affect the command, it can be named anything.
command:

    # [REQUIRED] → Command Type
    # The command type determines how the command will work.
    type: "info"
    
    # [REQUIRED] → Command Name
    # The name of the command, for example:
    # /[name] [arguments]
    name: "name"
    
    # [OPTIONAL] → Command Toggle
    # Disable or enable the command.
    # The value defaults to true.
    enabled: true

    # [OPTIONAL] → Command Aliases
    # Every command can have unlimited aliases.
    # Aliases are alternative command names that will execute the same command.
    aliases: ["name2", "name3"]

    # [OPTIONAL] → Command Permission
    # Every command can have permission to execute the command.
    # When this is not set, it will default to everyone.
    permission: "leaf.name"
    
    # [OPTIONAL] → Command Requirements
    # Add a permission requirement for different servers.
    require:
      # The requirements identifier.
      # This can be anything.
      "identifier":
        # The required permission.
        permission: "leaf.bypass"
        # The servers that the permission is required on.
        servers:
        - "ServerName"
```

{% endcode %}

## Example Command

{% code title="commands.yml" %}

```yaml
#  __         ______     ______     ______
# /\ \       /\  ___\   /\  __ \   /\  ___\
# \ \ \____  \ \  __\   \ \  __ \  \ \  __\
#  \ \_____\  \ \_____\  \ \_\ \_\  \ \_\
#   \/_____/   \/_____/   \/_/\/_/   \/_/
#
# Author : Smudge

commands:
  info:
    type: "info"
    name: "hello"
    # This message will be sent back to the player!
    message: "hello world"
```

{% endcode %}
