Here’s the code I quickly wrote to show the issue https://github.com/Meegooo/TestPlugin
When I launch main(String[] args) it works correctly, but when I try to launch Sponge, it throws MissingResourceException.
Now, the question. Where should I put those resource files for them to be found by Minecraft?
It’s because you havn’t packaged your resources properly.
I believe the resources folder is supposed to follow the same packaging rules as your src, and because it’s in the root directory of your resources folder it is currently unpackaged.
By nesting it inside folders in your resources it should be possible to reference the file using the correct package name in your jar?
Tried to move resource files to example package in resources (the package where main plugin file is located). Kept baseName the same. Doesn’t work.
Tried to keep resources where they were (in the root of resources), changed baseName to example.TestPlugin. Doesn’t work.
Tried both (move resource files and change baseName to include example package). Doesn’t work
PS. baseName is the name of bundle I put in ResourceBundle.getBundle()