Refactor Commands to Use a Common BaseCommand#4
Conversation
Introduced an abstract `BaseCommand` class to centralize common command logic, such as permission checks, player-only checks, and error handling. Refactored `ServersCommand` and `SetBlockCommand` to extend the new `BaseCommand`. This simplifies the individual command classes and reduces code duplication. Removed the now-redundant command definitions from `plugin.yml`, as this information is now handled programmatically within each command's constructor.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
|
|
This change introduces a new abstract
BaseCommandclass to serve as a template for all commands in the plugin. This class handles common boilerplate code such as:The existing
ServersCommandandSetBlockCommandclasses have been refactored to extend this newBaseCommand.Additionally, the command definitions in
plugin.ymlhave been removed, as this is now handled programmatically by theBaseCommandconstructor, fulfilling the user's request.PR created automatically by Jules for task 13338510543671846625