-
Notifications
You must be signed in to change notification settings - Fork 21
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
Migrate to Brigadier Commands #1504
base: master
Are you sure you want to change the base?
Migrate to Brigadier Commands #1504
Conversation
36ccf74
to
be49ba7
Compare
b9face2
to
df46e8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR migrates clan command functionality to the Brigadier framework and implements a proof‐of‐concept for custom argument types and asynchronous handling. Key changes include:
- Introducing multiple Brigadier subcommands for clan management (create, promote, invite, join, etc.).
- Updating utility methods and error handling in ClanManager and Clan to support Brigadier command requirements.
- Enhancing asynchronous behavior and command suggestion mechanisms.
Reviewed Changes
File | Description |
---|---|
clans/…/commands/subcommands/brigadier/BrigadierClanSubCommand.java | Base class for Brigadier clan subcommands; integrates client/clan checks. |
clans/…/ClanManager.java | Updated command-related methods and added exception-based validations. |
clans/…/brigadier/admin/BrigadierSetDominanceCommand.java | Implements admin command for setting clan dominance. |
clans/…/BrigadierClansCommand.java | Main Brigadier command registration with alias support. |
clans/…/brigadier/management/BrigadierTrustCommand.java | Implements trust functionality using Brigadier. |
clans/…/brigadier/management/BrigadierDemoteSubCommand.java | Implements demotion command with rank checks. |
clans/…/brigadier/management/BrigadierNeutralCommand.java | Implements neutral command for allied/enemy clan relationships. |
clans/…/brigadier/management/BrigadierInviteSubCommand.java | Implements invite command with permission and validation logic. |
clans/…/brigadier/management/BrigadierAllyCommand.java | Implements ally command logic using clan manager validations. |
clans/…/brigadier/general/BrigadierCreateSubCommand.java | Implements clan creation command with asynchronous filtering. |
clans/…/brigadier/management/BrigadierKickSubCommand.java | Implements kick command with updated UUID usages. |
clans/…/brigadier/management/BrigadierPromoteSubCommand.java | Implements promotion command with confirmation menu for leadership changes. |
clans/…/Clan.java | Updates member lookup methods and fixes UUID handling in message functions. |
clans/…/brigadier/general/BrigadierJoinSubCommand.java | Implements join command with dual argument support based on permissions. |
clans/…/brigadier/general/BrigadierInfoSubCommand.java | Implements info command with custom suggestion handling for clans/players. |
clans/…/DisbandClanSubCommand.java | Updates disband command with improved UUID comparisons. |
clans/…/auctionhouse/ClansAuctionListener.java | Updates auction listener to use correct UUID types. |
clans/…/Clans.java | Loads Brigadier commands via the new BrigadierClansCommandLoader. |
clans/…/commands/subcommands/KickSubCommand.java | Updates kick command UUID handling. |
clans/…/commands/subcommands/UnclaimSubCommand.java | Updates unclaim command UUID handling. |
Copilot reviewed 79 out of 79 changed files in this pull request and generated 2 comments.
.../betterpvp/clans/clans/commands/subcommands/brigadier/general/BrigadierCreateSubCommand.java
Show resolved
Hide resolved
clans/src/main/java/me/mykindos/betterpvp/clans/clans/Clan.java
Outdated
Show resolved
Hide resolved
…orEnemyClanArgument which only lists enemies of the executor
…t ranges of suggestions based on executor (which seems to be sender). Change how statics are passed to allow javadoc
…ement brigadier c ally.
…ayers have permission to use that argument, mirrored statics there for consistency. Update documentation, temporary fix for CommandListener preventing non-opped players from using commands.
… do checking entirely in argument. Add disband, enemy, setcore, and leave. Add admin arguments for promote, kick, and demote.
738dd10
to
a103668
Compare
|
WIP
Create Brigadier Framework for use in BetterPvP code. Create proof of concept loaders, custom argument types, and commands.
TODO:
Commands
Clan
Admin
General
Management
Features
/c info
for both players and Clans)Players will get more relevant suggestions
Staff will get access to selector arguments and better type hints for things like
customeffect
.Development will shift towards fully parsing/checking values in the argument type (as paper updates), so that this code is not duplicated in commands.
Fixes #1420
Checklist before requesting a review