Error with TitleAPI.jar no NMS

215 views Asked by At

So I have this a plugin(fully functional) that uses the TitleAPI 1.8 and when I put MyPlugin and TitleAPI in my plugin folder I start the server and then

    [17:33:23 ERROR]: Could not load 'plugins\TitlesAPI.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/mi
necraft/server/v1_7_R4/Packet
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:133) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
java:328) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
.java:251) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.ja
va:288) [craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.<init>(CraftServer.java:25
0) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.PlayerList.<init>(PlayerList.java:69) [c
raftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.DedicatedPlayerList.<init>(SourceFile:14
) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.jav
a:133) [craftbukkit.jar:git-Bukkit-33d5de3]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
:484) [craftbukkit.jar:git-Bukkit-33d5de3]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R4/Packet
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_45]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_45]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
a:40) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:129) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        ... 9 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R4.Packet

        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:67) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:62) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_45]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_45]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
a:40) ~[craftbukkit.jar:git-Bukkit-33d5de3]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
ava:129) ~[craftbukkit.jar:git-Bukkit-33d5de3]

So I tried using different version of bukkit and spigot and it always said that the class net.minecraft.server(NMS) isn't found and I don't know why.

1

There are 1 answers

0
JarFile On

It seems here that if you are relying on another bukkit plugin you should put it inside of your library.

enter image description here

Just add an external jar of Title API.

Also you need to depend on this plugin in your plugin.yml put:

name: Whatever
main: [pathToMain]
version: Whatever
depend: [TitleAPI]
description: Whatever
author: Whatever
website: Whatever
commands:

Make sure TitleAPI is the exact name of the plugin.

Based on this error, your question is not fully expressed, but this would be the answer if you are using TitleAPI in your plugin.