[HELP] NoClassDefFound on MythicMobs

Discussion in 'Spigot Plugin Development' started by Gober, Jun 12, 2018.

Thread Status:
Not open for further replies.
  1. It's been like days i'm being messaged with this error. And I tried milllions of times, can't make it work.
    Code (Text):
    16:29:00 ERROR]: Could not pass event PlayerInteractEntityEvent to AutoRide v1.5.1
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1580) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.PacketPlayInUseEntity.a(SourceFile:69) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.PacketPlayInUseEntity.a(SourceFile:13) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_171]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_171]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
    Caused by: java.lang.NoClassDefFoundError: io/lumine/xikage/mythicmobs/MythicMobs
    at com.gmail.JyckoSianjaya.AutoRide.Ride.RightClick(Ride.java:166) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-2086bb0-8cc5a7e]
    ... 15 more

    And here is the line 166:
    Code (Java):
                        MobManager mythic = MythicMobs.inst().getMobManager();
     
    While the code:
    Code (Java):
    public void onClick(PlayerInteractEntityEvent event) {
                    if (mera = true) {
                        if (mmride = true) {
                            try {
                        MobManager mythic = MythicMobs.inst().getMobManager();
                            if (mythic.getAllMythicEntities().contains(b)) {  
                            sendActionBar(player, mmfail);
                            return;
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                            sendConsole("AutoRide > An error has occured, do you have mythicmobs plugin?");
                        }
                        }
                    }

            Boolean mmride = config.getBoolean("disable-mythicmobs-ride");
        Boolean mera = Bukkit.getServer().getPluginManager().isPluginEnabled("MythicMobs");
    // This code has been shortened.
     

    If you need to know anything, feel free to ask.
    Every single help is appreciated :)
     
    #1 Gober, Jun 12, 2018
    Last edited: Jun 12, 2018
  2. Do you have Mystic mobs as a dependency on your yml?
     
  3. Yes I do.
    Here it is:
    Code (Text):
    name: AutoRide
    version: 1.5.1
    author: Gober
    description: Ride any entity if you have its permission
    main: com.gmail.JyckoSianjaya.AutoRide.Ride
    softdepend: [WorldGuard,MythicMobs,Citizens]
    commands:
          ride:
            usage: /<command>
            description: Retoggle riding on or off.
     
  4. *(Bumperino)*

    Still not yet solved.o_O
     
  5. you dont have mythicmobs installed on the server
    or youre building against a different version of mythicmobs than the server is running and the class youre trying to use isnt in the plugin youre currently using
     
  6. I do want to make MythicMobs as a softdepend. (Optional)
    But it doesn't work although I've tried to catch the error.
     
  7. then dont register that listener if mythic mobs isnt installed. handle mythic mobs stuff in its own class, do not create the class if mythic mobs doesnt exist
    /e also, your if statements with your booleans are wrong. comparing uses ==, not =. youre setting the boolean to true and it returns true because well.. youre setting it to true. just remove the = true part
     
    • Useful Useful x 1
  8. Oh yahh! Forgot these! xD! Thanks alot!
    Thread closed.
     
Thread Status:
Not open for further replies.