fix: if you type /bp now, the latest applied filters are still there (menu doesn't reset anymore)#73
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the block palette menu behavior so that typing /bp now retains the previously applied filters instead of resetting to defaults. It also introduces /bp menu as an explicit command to reset filters to defaults.
Changes:
- Modified command structure to differentiate between
/bp(remembers filters) and/bp menu(resets to defaults) - Swapped primary command name from
blockpalettetobpin plugin.yml, making the shorter alias the primary command - Added null safety check in ModuleHandler to prevent NullPointerException when disabled modules list is null
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/resources/plugin.yml | Changed primary command from blockpalette to bp, updated aliases and usage text |
| src/main/java/net/buildtheearth/modules/miscellaneous/blockpalettegui/BlockPaletteCommand.java | Split /bp and /bp menu logic to support filter persistence vs reset behavior, updated help message |
| src/main/java/net/buildtheearth/modules/ModuleHandler.java | Added null check for disabled modules list to prevent potential NullPointerException |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zoriot
left a comment
There was a problem hiding this comment.
Generally it seems to you have some unrelated changes which i made (possibly) in there.
Would be great if you can fix them. Create a new branch from build, cherry pick your commit(s), fix stuff like the imports and push it into this branch.
Should be easier then manually fixing everything
src/main/java/net/buildtheearth/buildteamtools/modules/ModuleHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/net/buildtheearth/buildteamtools/modules/ModuleHandler.java
Outdated
Show resolved
Hide resolved
…(menu doesn't reset anymore) (cherry picked from commit 7fe6133)
…(menu doesn't reset anymore)