Skip to content

Format String Specifications

Yao Chung Hu edited this page Dec 28, 2021 · 1 revision

Format string specifications

The formatting placeholders in Command Aliases are divided into 2 groups: Implementation and Execution

Implementation

The implementation format consist of 4 parameters:

  • Class Tool
    • Must be Implementation Class Tool
  • Method
  • Variable Name
  • Formatting Type (Optional)

Implementation Format

{ClassTool::Method#VariableName@FormattingType}

Examples of an implementation placeholder

  • {arg::string#message@jsonString} using optional formatting type
  • {arg::color#color}
  • {arg::brigadier:bool#state}

Invalid Implementation Format

  • {this::SELF@jsonString} using optional formatting type
  • {message@toUpper}
  • {message}

Execution

The execution format consist of 4 parameters, and 3 parameters at most:

  • Class Tool
    • Must be Execution Class Tool
    • When calling a class tool, you can't specify the variable name.
  • Method
    • Only can be used when class tool is called, if not it will parse as a variable name.
  • Variable Name
    • Binds Implementation Format Specified Variable Name to Execution.
  • Formatting Type (Optional)

Execution Format

{ClassTool::Method#VariableName@FormattingType}

Examples of an execution placeholder

  • {this::SELF@jsonString} using optional formatting type
  • {message@toUpper}
  • {message}
Invalid Execution Format
  • {message#message}
  • {arg::color}

Clone this wiki locally