PaperMC / PaperMC/docs

[Brigadier] Add a simple example

Open
#529 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
73
Forks
280
Avg merge
20h 52m
Merged PRs (30d)
4

Description

[!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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing Brigadier documentation pages and choose a command example that demonstrates permissions, nested arguments or literals, reused executors, and a visible in-game change. Create a step-by-step beginner guide, linking to the detailed pages for each concept; done means the guide presents a complete, user-friendly command without needing prior Brigadier expertise.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.