Skip to content

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