Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6502

Plugins can't load libraries from their transitive depends

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    •  

    • 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

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

              Created:
              Updated:
              Resolved: