docs icon indicating copy to clipboard operation
docs copied to clipboard

[Brigadier] Add a simple example

Open Strokkur424 opened this issue 11 months ago • 0 comments

[!NOTE] This issue is part of a series of issues regarding the extension of the Paper documentation regarding Paper's Brigadier API.

Currently, the documentation documents the separate aspects of Brigadier, but doesn't really bring all of them together in a real command. Therefore, it would be great if the documentation had a step-by-step creation of an actual user-friendly and refined command which provides some more logic. The command should display the usage of the following aspects:

  • Permissions (using requirements)
  • Nested arguments/literals
  • Reused command executors (E.g. default value if an argument is not provided)
  • Some visible change in-game

An example could be a skull-giving command, which has the following structure:

/skull
/skull <offline-player>
/skull <offline-player> <amount>

[!WARNING] The command example really isn't a great one. I would appreciate it if somebody who has a better idea could suggest it here

It should be made sure that this guide helps even a beginner go through the process of building up a command, but it doesn't have to go into detail of what the separate steps mean precisely. For this, it can just be linked to their respective pages where they are described in more detail.

Strokkur424 avatar Jan 22 '25 14:01 Strokkur424