[Brigadier] Add a simple example

未关闭
#529 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
领域
documentation

调研方向

查看现有的 Brigadier 文档页面,并选择一个能够演示权限、嵌套参数或字面量、复用的执行器以及游戏内可见变化的命令示例。创建一份面向初学者的分步指南,为每个概念链接到详细页面;当指南展示出一个完整、易于用户使用的命令,且不需要预先了解 Brigadier 时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
MDX
星标
73
派生
280
平均合并
16 小时 42 分钟
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PaperMC/docs 的其他 Issue

查看 PaperMC/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。