-
Notifications
You must be signed in to change notification settings - Fork 3
fix: if you type /bp now, the latest applied filters are still there (menu doesn't reset anymore) #73
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
base: master
Are you sure you want to change the base?
fix: if you type /bp now, the latest applied filters are still there (menu doesn't reset anymore) #73
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -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<>(); | ||||
|
|
||||
| for (Module m : modules) { | ||||
| if (!Objects.requireNonNull(BuildTeamTools.getInstance().getConfig().getList(ConfigPaths.DISABLED_MODULES)).contains(m.getModuleName())) { | ||||
| if (!disabled.contains(m.getModuleName())) { | ||||
| registerModule(m); | ||||
| } | ||||
| } | ||||
| } | ||||
|
|
||||
|
|
||||
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
|
||
| permission: blockpalette.use | ||
| buildteam: | ||
| description: Sends the player to the specified BuildTeam | ||
|
|
||
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.
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.