Skip to content

Instantly share code, notes, and snippets.

@TheAirBlow
Last active December 29, 2022 14:18
Show Gist options
  • Select an option

  • Save TheAirBlow/88dba4d200e91430b307be9969ded26d to your computer and use it in GitHub Desktop.

Select an option

Save TheAirBlow/88dba4d200e91430b307be9969ded26d to your computer and use it in GitHub Desktop.
SyntaxDefinition syntax

Basics

All of it boils down to just [list of types](text shown in usage).
Here's an example: [online_player integer string](<owner> <id> <name>)
The usage would be shown as &6Usage: &c/example <owner> <id> <name>.

Allowed types

online_player # Checks if the supplied string is a username of an online player.
cached_player # Checks if the supplied string is a username of a player that joined the server at least once.
short         # Normal 16-bit integer, nothing more.
integer       # Normal 32-bit integer, nothing more.
long          # Normal 64-bit integer, nothing more.
string        # Normal string, nothing more.

Extras

Unsigned

To make an integer type unsiged just add unsigned_ to it.
Here's an example: unsigned_integer, unsigned_long, etc.

Ranges

To make an integer type ranged, just supply two extra arguments.
Syntax is type<min, max>, here's an example: integer<0, 10>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment