Error with the HoverEvent in Spigot 1.8.3 :(

Discussion in 'Spigot Plugin Development' started by dunklesToast, May 7, 2015.

  1. I have an error with HoverMessages :(
    I am using the same Version in eclipse and as Server

    (CraftBukkit version git-Bukkit-a7287cb (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT))

    The Error:

    Code (Text):

    [19:30:17 ERROR]: Could not load 'plugins\MCLegend.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/BaseComponent
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:286) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:719) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.Bukkit.reload(Bukkit.java:543) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:622) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1025) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:886) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(SourceFile:37) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(SourceFile:9) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit.jar:git-Bukkit-a7287cb]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_25]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_25]
            at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:643) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [craftbukkit.jar:git-Bukkit-a7287cb]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit.jar:git-Bukkit-a7287cb]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
    Caused by: java.lang.NoClassDefFoundError: net/md_5/bungee/api/chat/BaseComponent
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_25]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_25]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            ... 20 more
    Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.chat.BaseComponent
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_25]
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_25]
            at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_25]
            at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_25]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25]
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_25]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_25]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[craftbukkit.jar:git-Bukkit-a7287cb]
            ... 20 more
     
    The Lines:

    Code (Text):

    if(cmd.getName().equalsIgnoreCase("start")) {
                Player p = (Player) sender;
                for(Player pp : Bukkit.getOnlinePlayers()) {
                    TextComponent message = new TextComponent( " Klicke §f[§aHier§f]" );
                    message.setClickEvent( new ClickEvent( ClickEvent.Action.RUN_COMMAND, "tp"+ p.getCustomName() ) );
                    message.setHoverEvent( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Schau zu!").create() ) );
                    pp.spigot().sendMessage(message);
                    pp.sendMessage(Main.prefix + " Du willst zuschauen?");
                       
                }
                 
            }
     
    The Imports

    Code (Text):

    import net.md_5.bungee.api.chat.ClickEvent;
    import net.md_5.bungee.api.chat.ComponentBuilder;
    import net.md_5.bungee.api.chat.HoverEvent;
    import net.md_5.bungee.api.chat.TextComponent;
     
     
  2. gigosaurus

    Supporter

    Use Spigot, not CraftBukkit.
     
  3. I am using Spigot. Without using it, i cant Import them
     
  4. gigosaurus

    Supporter

    Your server isn't though.
     
  5. But I am Using the same .jar in the like in eclipse
     
  6. gigosaurus

    Supporter

    (CraftBukkit version git-Bukkit-a7287cb (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT))
    Evidently not.
     
    #6 gigosaurus, May 7, 2015
    Last edited: May 7, 2015