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

Prevent reload from inadvertently closing the plugin class loader #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Derongan
Copy link

Prevent reload from inadvertently closing the plugin class loader which causes config behaviour change between startup/reload.

When the plugin class loader is closed, calls to getResource will always return null. Because of this, the default config will always be null. If a section is left out of the config it is defaulted to the values in the default config. This means that if someone leaves out say the blocks section, startup will cause the blocks section to be populated with the blocks section from the default config. Reloading using hiddenore will then close the class loader, and when reading the config in a second time the defaults won't be applied leading to some very confusing behaviour.

…ch causes config behaviour change between startup/reload.

When the plugin class loader is closed, calls to getResource will always return null. Because of this, the default config will always be null. If a section is left out of the config it is defaulted to the values in the default config. This means that if someone leaves out say the `blocks` section, startup will cause the blocks section to be populated with the blocks section from the default config. Reloading using `hiddenore` will then close the class loader, and when reading the config in a second time the defaults won't be applied leading to some very confusing behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant