Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/net/buildtheearth/modules/ModuleHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ public void registerModule(Module module) {
* @param modules {@link Module}
*/
public void registerModules(Module @NotNull ... modules) {
List<?> disabled = BuildTeamTools.getInstance().getConfig().getList(ConfigPaths.DISABLED_MODULES);
if (disabled == null) disabled = new ArrayList<>();
Comment on lines +48 to +49
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

This change to add null checking for the disabled modules list appears to be an unrelated bug fix that was included in this PR. While the change is good (it prevents a NullPointerException if the config list is null), it's a best practice to keep PRs focused on a single purpose. Consider separating unrelated bug fixes into their own PRs for clearer change tracking and easier code review.

Copilot uses AI. Check for mistakes.

for (Module m : modules) {
if (!Objects.requireNonNull(BuildTeamTools.getInstance().getConfig().getList(ConfigPaths.DISABLED_MODULES)).contains(m.getModuleName())) {
if (!disabled.contains(m.getModuleName())) {
registerModule(m);
}
}
}


Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

This extra blank line appears to be an unintentional addition. Consider removing it to maintain consistent formatting with the rest of the file.

Suggested change

Copilot uses AI. Check for mistakes.
/**
* Enables a specific module
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ public boolean onCommand(CommandSender sender,
sender.sendMessage("This command can only be used by players.");
return true;
}

Player player = (Player) sender;

// /bp or /bp menu ⇒ default filters + open block menu
if (args.length == 0
|| (args.length == 1 && args[0].equalsIgnoreCase("menu"))) {
// /bp ⇒ open block menu with remembered filters (do NOT reset to "color")
if (args.length == 0) {
blockPalletManager.openBlockMenu(player);
return true;
}

// /bp menu ⇒ reset to default filters + open block menu
if (args.length == 1 && args[0].equalsIgnoreCase("menu")) {
blockPalletManager.setPlayerFiltersAndOpen(player);
return true;
}
Expand All @@ -61,7 +67,8 @@ public boolean onCommand(CommandSender sender,
}

// invalid usage ⇒ show help
sender.sendMessage("§cUsage: §7/bp menu\n"
sender.sendMessage("§cUsage: §7/bp\n"
+ "§c or §7/bp menu\n"
+ "§c or §7/bp filter\n"
+ "§c or §7/bp filter <filter1> <filter2> …");
return true;
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ commands:
plotsystemterra:
description: Sends info about the plugin
usage: /plotsystemterra
blockpalette:
bp:
description: Opens the block palette menu.
usage: /blockpalette [filter|menu|filter <filter1> <filter2> ...]
aliases: [bp, blocks]
usage: /bp [filter|menu|filter <filter1> <filter2> ...]
aliases: [blockpalette, blocks]
Comment on lines +44 to +47
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The command registration in MiscModule.java uses "blockpalette", but plugin.yml now defines "bp" as the primary command with "blockpalette" as an alias. While this should still work functionally (since aliases are registered), it creates inconsistency. Consider updating the registration to use "bp" to match the new primary command name in plugin.yml.

Copilot uses AI. Check for mistakes.
permission: blockpalette.use
buildteam:
description: Sends the player to the specified BuildTeam
Expand Down
Loading