0

I am working on my Bukkit plugin, and I have a nice Library that I made in which I'd like to use. Unfortunately, I am being told that the class for the library is not being found.

org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: zone/luaq/lib/utils/command/LCommandExecutor

To sum it up, my library is simply to make my life easier when dealing with the Bukkit API. I am remaking things such as Scoreboards, Commands, etc. But, when I try to use it on my plugin it simply cannot find the class, my IDE (IntelliJ) also informs me of the classes not being found even though it finds them while programming (this error only occurs when I use the library itself and not the library jar file).

In the code, this is simply all I have.

LCommandUtils.register(this, "broadcast", new Broadcast());
LCommandUtils.register(this, "heal", new Heal(), true);
LCommandUtils.register(this, "feed", new Feed(), true);
LCommandUtils.register(this, "fly", new Fly(), true);
LCommandUtils.register(this, "flyspeed", new FlySpeed(), true);

It cannot seem to find the class, even though the library plugin is loading fine on the server. If anyone could help, that'd be great.

Thanks in advance, Luaq

Luaq
  • 11
  • 3
  • What are you using to build the plugin? Gradle, maven, the IDE itself? – LeoColman Jun 05 '18 at 00:36
  • I am using the IntelliJ Builder. So yes, essentially the IDE itself. – Luaq Jun 05 '18 at 00:44
  • Try to take a look at [this](https://stackoverflow.com/questions/42196697/adding-external-library-to-artifact-jar-in-intellij-idea). If it works, we should mark this question as a duplicate – LeoColman Jun 05 '18 at 00:50
  • It's already like this. https://gyazo.com/f02c6cf9cc9f2db622edd482589966be – Luaq Jun 05 '18 at 01:02
  • Try doing [this](https://blog.jetbrains.com/idea/2010/08/quickly-create-jar-artifact/) – LeoColman Jun 05 '18 at 01:07
  • I am exporting it correctly, I am pretty sure. They both export fine, I am just confused as to why it cannot locate the class or package. – Luaq Jun 05 '18 at 01:29

0 Answers0