NoClassDefError when using GlowAPI

Discussion in 'Plugin Development' started by SolemanSeb, Dec 8, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    SolemanSeb

    I am creating a modified version of Dreams manhunt plugin. I'm adding features to make it easier and more fun for my friends and I to play. I wanted to add a feature where teammates could see each other through walls (with the glowing effect you get from spectral arrows). I found that I could use GlowAPI and the GlowAPI.setGlowing(Player player, GlowAPI.Color color, Collection<? extends Player> receivers) command to set the glow for a players teammates.

    The command is able to be called, but crashes when trying to get the GlowAPI.Color (which is a public static enum in the same package as the GlowAPI class), because "NoClassDefError". Below are pictures of my calls, my pom.xml and their enum.

    I don't understand why this is not working. The GlowAPI.setGlowing() is being called, but it can't seem to use the Color enum. How do I fix this?
     

    Attached Files:

  2. Offline

    byteful

    Did you shade the lib in or did you add the standalone plugin? Make sure the API is available at runtime.
     
  3. Offline

    359Cube

    Did you load the lib into the JVM? If this api can load as a plugin, add this api into depend in plugin.yml and load it as a plugin in server.If you want exeport it with you plugin jar or the api can't load as a plugin, you can put it in your jar and add its path into META-INF/MAINIFEST.MF as a lib.(JVM will load it)
    upload_2021-12-19_22-55-28.png

    or you can write this into your plugin.yml

    depend: [lib plugin's name]
     
Thread Status:
Not open for further replies.

Share This Page