Skip to content

feat(paper): document command syntax exceptions - #827

Open
spa77k wants to merge 2 commits into
PaperMC:mainfrom
spa77k:docs/command-exceptions
Open

spa77k wants to merge 2 commits into
PaperMC:mainfrom
spa77k:docs/command-exceptions

Conversation

@spa77k

@spa77k spa77k commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Closes #537

Adds a new "Exceptions" page to the Brigadier basics, covering:

  • the CommandExceptionType implementations (SimpleCommandExceptionType, DynamicCommandExceptionType, ...) and how to throw them
  • using components as messages via MessageComponentSerializer
  • createWithContext and the <--[HERE] line, and when it is shown
  • CommandSyntaxException.BUILT_IN_EXCEPTIONS, with a table of all built-in exceptions and their English messages

I tested the examples on Paper 26.3 (build 240).

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

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

@Machine-Maker

Copy link
Copy Markdown
Member

I think it would be useful to include some cropped screenshots from the ingame error messages, especially the one that shows the line position parsing failed at, instead of recreating them from just plain text.

@spa77k

spa77k commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Good idea, thanks! I replaced the plain-text output with cropped in-game screenshots, and added two more for the full-health message and the component message.

This branch was successfully deployed

1 active deployment
Preview — 7fe80789 Deployed Nov 4, 2026 by github-actions[bot]
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.

[Brigadier] Document command syntax exceptions

2 participants