It shows that the NBTAPI package has not been moved although from what I see I DID move it according to what the guide said... (Shading The Plugin Problem)
MSitiSoftware opened this issue ยท 6 comments
Here's what I added and what is currently written in my pom.xml file that I guess is supposedly related to the NBTAPI shading:
This in :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>me.negai.wanddesigner.nbtapi</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
And this in dependencies:
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.13.1</version>
</dependency>
And this on onEnable method in the plugin's main class:
@Override
public void onEnable() {
if (!NBT.preloadApi()) {
getLogger().warning("NBT-API wasn't initialized properly, disabling the plugin");
getPluginLoader().disablePlugin(this);
return;
}
}
Correct. That means it didn't work/run. Check the output when running the
mvn clean install
command.
I succeeded in fixing this, thank you so much for helping!
Look inside the jar, also do you actually build with maven and not the ide?
What do you mean by looking inside the jar?
And no I don't build with the IDE I build it with maven can it be the problem that causes this?