WiIIiam278 / HuskTowns

A simple and elegant proxy-compatible Towny-style protection plugin
https://william278.net/project/husktowns
Apache License 2.0
77 stars 44 forks source link

API: Unable to use the API alongside Adventure 4.17.0 #523

Open fabianmakila opened 3 weeks ago

fabianmakila commented 3 weeks ago

Problem

The API seems to include an older version of adventure that is shaded into the API itself. This breaks any adventure code that is written for a newer version of adventure.

This means that the API can't be used for example with modern Paper versions which include a more modern version of adventure.

I tried doing this which would work if the dependency was transitive:

compileOnly("net.william278.husktowns:husktowns-bukkit:3.0.6") {
        exclude("net.kyori")
    }

But since the adventure is shaded onto the API itself, doing the above does nothing. So basically there is no easy way to exclude the adventure classes imported by HuskTown's API without doing some crazy hacks that might or might not work.

Suggested fix

Preferably adventure wouldn't be shaded onto the API itself, but instead be imported as a transitive dependency. This way the API could be used alongside multiple versions of adventure — not just the one version the API uses at given moment.

WiIIiam278 commented 3 weeks ago

So there's a few issues at play here:

I'm not sure how to achieve all three of these. I think it might be impossible? Suggestions welcome. I'll do a deeper dive when I have some more time :)

EDIT: Oh, your issue specifically relates to the API. In which case one needs to make adventure-platform-bukkit transitive.