-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Customizable Language Selection Panel #2254
Conversation
This implements customizable Language Selection Panel. By default, panel is generated in `/plugins/bentobox/panels` folder, however, if GameModeAddon has a specific panel defined in their folder, then that panel is taken.
Hi @tastybento This is a fully implemented customizable language selection panel for users. I also implemented the unit test, but I am unsure if it tests everything. But for me, it passed. |
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 12 New issues |
@@ -463,6 +463,10 @@ public boolean loadSettings() { | |||
getPluginLoader().disablePlugin(this); | |||
return false; | |||
} | |||
|
|||
log("Saving default panels..."); | |||
this.saveResource("panels/language_panel.yml", false); |
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 begs a question - if we used false as the second parameter then if this panel ever needs to be updated by us, e.g., new code, then we will have to have admins remove the old panel yml file when updating. If however, we use true, then we will overwrite the file and ensure that the latest file is used with the latest code. Do you think there's ever going to be a need for admins to adjust these panels? And even if they did, due to code updates, their old yml may not work with the new release, so it'd be better to overwrite it. What do you think?
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.
I do not think it is necessary to overwrite them. Otherwise how admins will be able to customize their menus if we overwrite them always.
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.
Yeah, good point. The only thing then going forward is that instructions for upgrading will need to include directions to delete the old panel file (or move it) if the change is affected by it. During my development of the team GUI I've had a number of times I forgot to delete it and wondered why I was getting weird operations.
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.
Looks good to me
This implements customizable Language Selection Panel. By default, panel is generated in
/plugins/bentobox/panels
folder, however, if GameModeAddon has a specific panel defined in their folder, then that panel is taken.