Skip to content

Refactor Commands to Use a Common BaseCommand#4

Merged
indra87g merged 1 commit into
mainfrom
feature/base-command-refactor
Sep 26, 2025
Merged

Refactor Commands to Use a Common BaseCommand#4
indra87g merged 1 commit into
mainfrom
feature/base-command-refactor

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

This change introduces a new abstract BaseCommand class to serve as a template for all commands in the plugin. This class handles common boilerplate code such as:

  • Permission checks
  • Ensuring the command is run by a player
  • Basic error handling

The existing ServersCommand and SetBlockCommand classes have been refactored to extend this new BaseCommand.

Additionally, the command definitions in plugin.yml have been removed, as this is now handled programmatically by the BaseCommand constructor, fulfilling the user's request.


PR created automatically by Jules for task 13338510543671846625

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.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@indra87g indra87g marked this pull request as ready for review September 26, 2025 09:10
@indra87g indra87g merged commit 63dff7e into main Sep 26, 2025
1 check passed
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