Skip to content
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

[Bug]: On a bad initialization, /mvinv commands (and other things) will always throw an internal error. #519

Open
Lildirt opened this issue Feb 28, 2023 · 0 comments
Labels
Bug: Confirmed Issue/problem with the software.

Comments

@Lildirt
Copy link

Lildirt commented Feb 28, 2023

Information

This log is somewhat unrelated to the actual issue here, as it indicates a broken config (which may be a freak one-off accident for this particular server, time will tell). For context on this specific StackOverflow, see this conversation on Discord.

Details

Description
Reported in mv-support Discord channel. Original report can be found here. This issue can be seen in-code for Multiverse-Inventories. If an issue happens during the onEnable, we might not actually do the registerCommands() method in the main plugin class. In this case, the local command map that we make will be null, so when they try to run any MV-Inv command, an uncaught NPE will be raised.

This issue should encompass general clean-up for situations when MV-Inv doesn't initialize properly. Another exception can be seen when the server shuts down (referring to the log above), as we try to call the onDisable code regardless of the plugin failing to enable properly.

Steps to reproduce
Have an invalid plugin setup. Completely missing Multiverse-Core with Multiverse-Inventories installed, or an outdated Core with a new Inventories, or a broken configuration file, or really any situation that stops MV-Inv from finishing the onEnable block.

Expected behavior
Probably best to not throw a vague error here. People might think something is wrong with Inventories itself, instead of their specific configuration having a problem. We should give a helpful little message telling them that things are broken.

@Lildirt Lildirt added the Bug: Unconfirmed Unsure if the issue/bug is valid. label Feb 28, 2023
@zax71 zax71 added Bug: Confirmed Issue/problem with the software. and removed Bug: Unconfirmed Unsure if the issue/bug is valid. labels Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed Issue/problem with the software.
Projects
None yet
Development

No branches or pull requests

2 participants