Plugins can't load libraries from their transitive depends

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: None
    • Environment:

       

    • 1.16.5
    • Yes

      146a7e4bd76 adds library support, like on BungeeCord.
      This feature works brilliantly on BungeeCord, however, it does not on Spigot:
      If a plugin loads a class of a library it is dependent on a ClassCastException is thrown.
      This is because Spigot expects the Classloader of a class loaded from another PluginClassloader to be an instance of PluginClassLoader as well see:
       
      https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java#119
       
      If this check would only apply if the Classloader of the given class is a PluginClassloader the classloading would work as well as on BungeeCord

            Assignee:
            Unassigned
            Reporter:
            Leonhard Solbach
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: