CommandAPI/CommandAPI

I tried shading CommandAPI into my core plugin and then I saw this error when my plugin tried to load ()

MSitiSoftware opened this issue · 2 comments

CommandAPI version

9.5.3

Minecraft version

1.17

Are you shading the CommandAPI?

Yes

What I did

I removed CommandAPI from dependencies in my plugin.yml because I'm going to shade it instead,

Then I entered the onLoad() method on my core plugin's Main Class and I pasted there this code:

CommandAPI.onLoad(new CommandAPIBukkitConfig(this).verboseOutput(true)); // Load with verbose output

Then I entered the onEnable() method and I pasted this code:

CommandAPI.onEnable();

Then I entered onDisable method an I pasted this code:

CommandAPI.onDisable();

image

What actually happened

This error:
image

What should have happened

The plugin to be shaded into my core plugin and then I can use it in my core plugin's code without me needing to depend it in plugin.yml etc and/or put it in the plugins folder (the CommandAPI plugin)

Server logs and CommandAPI config

image

Other

No response

It seems that something may be wrong with how shading is set up in your build script (pom.xml for maven/build.gradle for gradle). Information for how to do that is located here (https://commandapi.jorel.dev/9.5.2/setup_shading.html#shading-with-maven) in the documentation.

The CommandAPI Discord is a good place to troubleshoot issues like this since it can have more of a conversation. Alternatively, I'd be happy to take a look at your build files here if the documentation I linked does not resolve your issue.

It seems that something may be wrong with how shading is set up in your build script (pom.xml for maven/build.gradle for gradle). Information for how to do that is located here (https://commandapi.jorel.dev/9.5.2/setup_shading.html#shading-with-maven) in the documentation.

The CommandAPI Discord is a good place to troubleshoot issues like this since it can have more of a conversation. Alternatively, I'd be happy to take a look at your build files here if the documentation I linked does not resolve your issue.

Thank you for pointing that out I missed that important step in the pom.xml (which is embarrassing me right now lol because it was one of the main steps there). everything is working perfectly now. Thanks so much!