Lanat Help

Default tags

Lanat provides a few tags that are ready to be used in descriptions:

link

Gets the representation of the target object specified by the route.

Example:

@Command.Define( description = "This is a link to the argument: <link=args.name>" ) class MyCommand extends CommandTemplate { @Argument.Define(required = true, positional = true) public String name; }

Shows as:

Representation of the example
desc

Gets the description of the target object specified by the route.

Example:

@Command.Define( description = "This is a link to the argument: <link=args.name>" ) class MyCommand extends CommandTemplate { @Argument.Define( required = true, positional = true, description = "Description of the command: <desc>" ) public String name; }

Shows as:

Representation of the example

color

Changes the color of the text.

The syntax for specifying colors is foreground[:background], where foreground and background follow the syntax color_name|#rrggbb|r,g,b.

  • #rrggbb is the hexadecimal value of the color.

  • r,g,b are the RGB values of the color.

  • color_name is a case-insensitive color name. The values that may be used are:

    • black

    • red

    • green

    • yellow

    • blue

    • magenta

    • cyan

    • white

    • gray / grey

    • dark red

    • dark green

    • dark yellow

    • dark blue

    • dark magenta

    • dark cyan

    • dark white

Example:

"<color=red>This is red text, <color=#00ff7e:black>and this is green text on a black background."

Which shows as:

Representation of the example
format

Changes the format of the text. (e.g. <format=bold>). The format value is case-insensitive.

The syntax for specifying formats is format[,format,...] where format is [!]format_name. ! is used to reset the format of that kind.

The values that may be used are:

  • reset

  • bold / b

  • italic / i

  • underline / u

  • strikethrough / s

  • dim

  • blink

  • reverse

  • hidden

Example:

"<format=bold,italic>This is bold and italic text, <format=!italic>and this is just bold text. <format=reset>And this is normal text."

Which shows as:

Representation of the example
default

Gets the default value of an argument.

Returns Default value: <value>.

If a value is given, it is used. Otherwise, the default value of the argument is used.

Last modified: 26 May 2024