Skip to content

feat(commands)!: migrate to modern Cloud command trees - #112

Merged
Zoriot merged 6 commits into
mainfrom
command-system-rework
Oct 11, 2026
Merged

Zoriot merged 6 commits into
mainfrom
command-system-rework

Conversation

@Zoriot

@Zoriot Zoriot commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Replace Bukkit command executors, plugin.yml command definitions and tab-completer infrastructure with a shared Cloud command manager. Remove obsolete command listeners, completion helpers and inert command registrations while retaining permission metadata and module-enabled guards.

Use the modern PaperCommandManager with native Brigadier integration and require Paper 1.20.6 or newer. Add cloud-minecraft-extras, MinecraftHelp at /btt help, and rich command descriptions.

Register administrative, generator, navigation, address, warp, palette and KML actions as explicit Cloud subcommands. Parse warp migration sources as enums and preserve free-form geographic payloads and multi-word names.

Share canonical command trees with configured aliases to avoid ambiguous root registration. Respect immutable Cloud builders so handlers, arguments and permissions are retained. Apply the same command shapes and permission checks to standalone labels and /btt routes.

Make every standalone label configurable, including canonical names such as warp. Empty alias lists disable standalone registration without removing /btt feature routes. Update internal generator links, copied commands and KML command blocks to use always-available root routes.

Rename warpsbt to btwarps and reverse the corresponding aliases to btwarp and buildteamwarps. Document configuration migration, root-only registration and the new minimum Paper version.

Add command-tree regression coverage for default aliases, root-only configuration, custom standalone labels, nested routes, typed arguments, defaults, permissions, handler execution and invalid input.

BREAKING CHANGE: Paper 1.20.6+ is required. Standalone labels must be explicitly listed in commands.aliases; empty lists now expose features only under /btt. Rename the warpsbt configuration key to btwarps and add canonical standalone labels to existing lists where desired.

@Zoriot
Zoriot requested a review from Redstoner507 October 4, 2026 20:18
@Zoriot Zoriot self-assigned this Oct 4, 2026
@Zoriot Zoriot added 🚨 high priority This currently has high priority. 🐘 large size This is a large issue. labels Oct 4, 2026
@Zoriot
Zoriot added this pull request to stack #113 October 4, 2026 20:19
@Zoriot Zoriot linked an issue Oct 4, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@Zoriot
Zoriot force-pushed the command-system-rework branch 2 times, most recently from 248f4d8 to 88d2ccf Compare October 4, 2026 21:14
Redstoner507
Redstoner507 previously approved these changes Oct 6, 2026

@Redstoner507 Redstoner507 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The migration looks great and everything’s seems to work properly.

Comment thread README.md Outdated
@Zoriot
Zoriot force-pushed the command-system-rework branch 2 times, most recently from 19638c2 to 61f9378 Compare October 10, 2026 20:37
Base automatically changed from configuration-rework to main October 11, 2026 20:23
Replace Bukkit command executors, plugin.yml command definitions and tab-completer infrastructure with a shared Cloud command manager. Remove obsolete command listeners, completion helpers and inert command registrations while retaining permission metadata and module-enabled guards.

Use the modern PaperCommandManager with native Brigadier integration and require Paper 1.20.6 or newer. Add cloud-minecraft-extras, MinecraftHelp at /btt help, and rich command descriptions.

Register administrative, generator, navigation, address, warp, palette and KML actions as explicit Cloud subcommands. Parse warp migration sources as enums and preserve free-form geographic payloads and multi-word names.

Share canonical command trees with configured aliases to avoid ambiguous root registration. Respect immutable Cloud builders so handlers, arguments and permissions are retained. Apply the same command shapes and permission checks to standalone labels and /btt routes.

Make every standalone label configurable, including canonical names such as warp. Empty alias lists disable standalone registration without removing /btt feature routes. Update internal generator links, copied commands and KML command blocks to use always-available root routes.

Rename warpsbt to btwarps and reverse the corresponding aliases to btwarp and buildteamwarps. Document configuration migration, root-only registration and the new minimum Paper version.

Add command-tree regression coverage for default aliases, root-only configuration, custom standalone labels, nested routes, typed arguments, defaults, permissions, handler execution and invalid input.

BREAKING CHANGE: Paper 1.20.6+ is required. Standalone labels must be explicitly listed in commands.aliases; empty lists now expose features only under /btt. Rename the warpsbt configuration key to btwarps and add canonical standalone labels to existing lists where desired.
Replace outdated command and alias details with links to maintained documentation pages for commands, permissions, and configuration.
Commands of modules that are disabled in the config or failed to start
(for example Navigation and Stats when the API key is not configured)
were still registered, and therefore visible in help and tab completion.

- Defer registration until module state is known: registrations are
  queued per owner module and flushed by registerEnabledCommands()
  after ModuleHandler.enableAll() in BuildTeamTools.onEnable.
- Register late when a module is enabled afterwards (for example via
  NetworkModule.enableDisabledModules() after /btt reload-config or
  /btt cache update). Module.enable() flushes that module's queue and
  ManagerSetting.ALLOW_UNSAFE_REGISTRATION is enabled for this.
- Skip registration entirely for modules listed in disabledModules.
- Add Permission-typed register/registerAliased overloads and give the
  /warp and /address roots the permissions their handlers enforce, so
  help only lists commands the sender can actually execute.
- Update the MainConfig comments accordingly.
- Add regression tests for root permissions, config-disabled modules,
  failed-startup modules and late enabling.
/btt reload and /btt reload-config ran the same handler. Keep only
reload-config, which is the more descriptive name, and drop "reload"
from the reserved command names.

BREAKING CHANGE: /btt reload no longer exists, use /btt reload-config.
The configured lists are the full set of standalone command labels
(the first entry is the primary label), not only extra aliases.
Removing a command's own name from its list removes the standalone
command, which the old name did not make clear.

- Rename MainConfig.Aliases to Labels and commands().aliases() to
  labels(); update BttCommandManager, KmlCommand and the tests.
- Shorten the config comments and state that a command's own name must
  stay in its list, that an empty list disables the standalone command
  and that /btt <command> is always available.
- Rename the local variable in featureBuilders and add a short comment.

BREAKING CHANGE: the commands.aliases section in config.yml is now
commands.labels. Existing customized lists must be moved to the new key,
otherwise the defaults are used.
@Zoriot
Zoriot force-pushed the command-system-rework branch from bcb11e6 to c925876 Compare October 11, 2026 20:24
@Zoriot
Zoriot merged commit ad1cb8f into main Oct 11, 2026
4 checks passed
@Zoriot
Zoriot deleted the command-system-rework branch October 11, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 high priority This currently has high priority. 🐘 large size This is a large issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework: Command System

2 participants