WorldGuard

WorldGuard

8M Downloads

NoSuchMethodError getProfileService()

LadyCailinBot opened this issue ยท 4 comments

commented

WORLDGUARD-3712 - Reported by Martyn

Using maven with the worldguard-legacy 6.1.3 snapshot, and running the latest build (1676) I get the following error running my plugin:

Caused by: java.lang.NoSuchMethodError: com.sk89q.worldguard.bukkit.WorldGuardPlugin.getProfileService()Lcom/sk89q/squirrelid/resolver/ProfileService;
        at pw.woa.ProtectionStones.Main.onCommand(Main.java:173) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.10.jar:git-Paper-784]
        ... 15 more

I decompiled the WorldGuard build and it indeed has no squirrelid.resolver.ProfileService package, only the old util.profile.resolver.ProfileService one. Did I mess something up?

commented

Comment by wizjany

if you are downloading worldguard for use, grab the build from teamcity/http://builds.enginehub.org
maven artifacts are just for compiling on atm

edit: oic what you are saying this now. was confused because this was labelled as a worldguard bug, but it's completely unrelated to the plugins themselves...

commented

Comment by wizjany

ok technically transitive dependencies should be separately depended and shaded by third party plugins, but to be safe i am now publishing the 'dist' jars to maven. plugins will have to build on the correct jar if they are using transitive dependencies (like squirrelid) from within worldguard.

commented

Comment by wizjany

we are no longer being safe.
plugins shouldn't be using worldguard-specific things like that - profile service isn't part of worldguard's api and shouldn't be considered as such.
if a plugin needs it for some reason, they can shade their own version.

commented

Comment by Martyn

Ok will do that then, thanks for looking into it.