Multiverse-Portals

Multiverse-Portals

2M Downloads

Support Spigot 1.12

zombachu opened this issue · 12 comments

commented

1.12 removed the deprecated version of YamlConfiguration.loadConfiguration() that took InputStream as a parameter. Problem line here

commented

I'll see about fixing this today/tomorrow.

commented

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.

commented

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!

commented
commented

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.

commented
commented

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!

Multiverse-Portals-2.5.0-SNAPSHOT.jar.zip

commented

@chrismin13 - looks like the build is missing from the plugin.yml
authors: ['Rigby', 'fernferret']
version: 2.5.0-SNAPSHOT-bUNKNOWN

commented
commented
commented

Maybe its possible to start an build process on the jenkins?

commented

Weird. Not sure why it didn't build automatically. I just triggered a build now.