Support Spigot 1.12
zombachu opened this issue · 12 comments
1.12 removed the deprecated version of YamlConfiguration.loadConfiguration() that took InputStream as a parameter. Problem line here
Ah, my bad about creating a duplicate issue. My eyes must've skipped over the other one when I checked before making this one. Thanks for the quick update, though.
Hi any update on when this will be fixed? Also, could you verify that if the plugin fails to load that it is not sending a shut down event to Spigot Server? I have 6 plugins that fail and the server shuts down and according to Spigot, its "a plugin" that is the cause. I've reported on the other 5 plugin pages and now this one. :-) Thanks!
You 'just' have to replace the call
YamlConfiguration.loadConfiguration([InputStream])
with
YamlConfiguration.loadConfiguration([InputStreamReader])
but that needs some more code to be added...
I had to do this with some of my plugins aswell.
Done. Change line 245 to:
Configuration portalsDefaults = YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getResourceAsStream("/defaults/config.yml"), Charsets.UTF_8));
Also, add Spigot 1.12-pre6 to the pom.xml, but make sure it's at the top of the dependencies, otherwise it won't work.
Below is a compiled and tested version. Had trouble creating a pull request, so this will do for now. Enjoy!
@chrismin13 - looks like the build is missing from the plugin.yml
authors: ['Rigby', 'fernferret']
version: 2.5.0-SNAPSHOT-bUNKNOWN