Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Brigadier Documentation #507

Open
wants to merge 135 commits into
base: main
Choose a base branch
from

Conversation

Strokkur424
Copy link
Contributor

@Strokkur424 Strokkur424 commented Dec 14, 2024

This PR aims to improve the documentation for Paper's new way of declaring commands using the Brigadier API.

Tip

I suppose this PR is now mergable. Not all content points have been included yet, but I will be declaring seperate PRs for those. This PR is big enough as-is

Roadmap:

Content

  • Add Bukkit <-> Paper command comparison
  • Introduction page
  • Command Tree Structure
  • Arguments and Literals
  • The executes method
  • The requires method
  • Native Arguments (StringArgumentType, IntegerArgumentType, etc)
  • Registering Brigadier Commands
  • BasicCommand
  • Minecraft Arguments
  • Registry Arguments (The current arguments page)
  • Examples (Separate PR)
  • Custom Arguments (Separate PR)
  • Common Issues (Separate PR)
  • Quick reference (Separate PR)
  • FAQ (Separate PR)
  • Advanced (dispatcher and fork) (Separate PR)

Finalization

  • Add Javadocs links where ever possible
  • Final revision (Mergable)

Reasons for opening a PR:

I wanted to open this PR so that other people could check out the current state of things and help me improve (and potentially even correct me on) the documentation I am writing. I want to make sure that everybody, beginner or advanced, can understand everything written here with ease, because the Brigadier system is less scary than it sounds, yet it is not well documented.

If you want to help contribute:

There is two ways you can help me with this PR:

  1. Start a code review and just highlight any issues you see with the current state of things. I will try my best to improve on those issues.
  2. Open a PR to my fork/branch. This would make sense for new pages, but for editing existing pages, unless the change is big, I would prefer the first option.

If you have any suggestions...

...please do not hesitate to comment on this PR. I will take all suggestions into consideration.

Let's make the docs even better 🚀

@Strokkur424 Strokkur424 marked this pull request as draft December 14, 2024 11:15
Copy link

github-actions bot commented Dec 14, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
papermc-docs ✅ Ready (View Log) Visit Preview 5113557

docs/paper/dev/api/command-api/arguments/entity-player.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/enums.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/paper.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/basics/command-tree.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/basics/command-tree.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/registry.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/registry.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/registry.mdx Outdated Show resolved Hide resolved
Copy link
Contributor

@Lulu13022002 Lulu13022002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have both Art and Painting variant overview in the registry arguments page. Ideally names should be consistent either use bukkit name or the name in game.

docs/paper/dev/api/command-api/arguments/paper.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/registry.mdx Outdated Show resolved Hide resolved
docs/paper/dev/api/command-api/arguments/registry.mdx Outdated Show resolved Hide resolved
@Strokkur424
Copy link
Contributor Author

You have both Art and Painting variant overview in the registry arguments page. Ideally names should be consistent either use bukkit name or the name in game.

For the command, I always use the registry name and for the name (the header) I use the backing object type. This is consistent with the other registries (E.g Music instrument). I can rename the headers to be consistent with the name of RegistryKey.XYZ and the in-game command though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants