Skip to content

feat: migrate commands to Paper Brigadier and update to 1.21.5#4

Open
RhythmicSys wants to merge 1 commit intomasterfrom
brig
Open

feat: migrate commands to Paper Brigadier and update to 1.21.5#4
RhythmicSys wants to merge 1 commit intomasterfrom
brig

Conversation

@RhythmicSys
Copy link
Member

Summary

This PR updates the plugin for current Paper versions and migrates command handling to the Brigadier/lifecycle API.

What's Changed

Upgraded platform targets:

  • Java 17 -> 21
  • paper-api 1.20.4 -> 1.21.5
  • plugin.yml api-version 1.20 -> 1.21.5
  • plugin.yml changed paper-plugin.yml

Replaced legacy CommandExecutor usage with Paper lifecycle command registration:

  • /back command now built with Brigadier
  • /backreload command now built with Brigadier

Added centralized Brigadier command exception definitions in commands/Exceptions for user-facing errors:

  • No back location
  • Blacklisted world
  • Cooldown remaining (dynamic message)
  • Invalid/missing player argument

Refactored naming for clarity and as to not overlap with other names in Brig:

  • Message -> LocaleMessage
  • Permissions -> BackPermission

Moved permission registration into runtime startup:

  • Permissions are now registered from BackPermission enum in onEnable()
  • Added permission back.force - only for non-player-senders

Simplified plugin.yml, changed to paper-plugin.yml:

  • Removed command and permission declarations (now handled in code)
  • Added project website link

Added new locale message keys:

  • error.must-provide-player
  • error.player-invalid

Behavior Notes

  • Added /back <player> which is specific to non-player senders with force-back permission.
  • Error responses are now Brigadier exceptions serialized as Adventure components, keeping localized formatting.

- bump Java to 21 and paper-api to 1.21.5
- switch `/back` and `/backreload` from CommandExecutor to lifecycle Brigadier registration
- add command exception types for localized error/cooldown feedback
- rename `Message` -> `LocaleMessage` and `Permissions` -> `BackPermission`
- register permissions in code and remove command/permission blocks from plugin.yml
- add new locale keys for invalid/missing player arguments
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.

1 participant