Oheers / EvenMoreFish

An advanced fishing plugin based on MoreFish, created 2 years after its last update.
MIT License
96 stars 60 forks source link

Prevent NPEs when configs don't load properly. #369

Closed FireML closed 5 months ago

FireML commented 5 months ago

If the config variable is null, caused by an issue with the config, the plugin will provide an empty YamlConfiguration so it can use the defaults.

It will tell console every time getConfig() is called so a broken config cannot be missed:

[16:03:09 INFO]: FireML issued server command: /emf admin competition start 10
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.
[16:03:09 WARN]: [EvenMoreFish] competitions.yml has not loaded properly. Please check for earlier errors.