Maven Shade

Discussion in 'Plugin Development' started by TheBigSuperCraft, Jun 19, 2014.

Thread Status:
Not open for further replies.
  1. Hello,
    Every time I try to use Maven Shade with other plugins, those plugins are getting enabled when the server starts instead of mine. I can't seem to find the problem but you, guys, might help.
    Thank you!
     
  2. Offline

    Garris0n

    You're trying to shade other plugins in to one jar?

    That's not how it works.
     
  3. So how it works?
     
  4. Offline

    Garris0n

    Plugins are loaded as individual jars. That's how Bukkit was designed.

    Maven Shading is for shading in libraries for your code to use instead of providing them externally. So, if I wanted, say, the Fanciful library, I would shade in the classes and use them. Fanciful, however, is not (currently) a plugin. If we have a plugin dependency, say ProtocolLib, the plugin has to be in the build path so CraftBukkit can load it properly. This means that we can't just shade the entirety of ProtocolLib into our code and expect it to work. You'd have to depend on its code, but you would not shade it in because it will already be there in a plugin.

    Now, there's probably some overcomplicated way to stuff them all together, but it's completely pointless and will cause problems, so I'm not going to go there.
     
    TheBigSuperCraft likes this.
  5. Okay, thank you!
     
Thread Status:
Not open for further replies.

Share This Page