mcMMO API - getXP

Discussion in 'Plugin Development' started by Quasindro, Apr 12, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Quasindro

    I'm so annoyed at this point, omg. I have tried basically everything I know to get this to work, but it just cannot.
    So we have this:
    https://github.com/mcMMO-Dev/mcMMO/...java/com/gmail/nossr50/api/ExperienceAPI.java

    I have imported the mcmmo.jar into my Eclipse project and messed around with syntaxes, but I just can't display the XP of specific skill. It just doesn't work. Either Eclipse rejects my project or the command doesn't work, throwing an internal error. It's my first time using external API, so I'm pretty sure that I'm not aware of the most silly mistake I probably make. So how would you do this?
     
  2. Offline

    Gater12

    Quasindro
    What is the internal error?
    (Check the console)
     
  3. Offline

    Quasindro

    Gater12
    Code:
    org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin mcMenu v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:952) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at com.bergerkiller.bukkit.common.internal.network.CommonPacketHandler$CommonPlayerConnection.a(CommonPacketHandler.java:244) [BKCommonLib-1.57.jar:?]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NoSuchMethodError: com.gmail.nossr50.datatypes.skills.SkillType.getSkillName()Ljava/lang/String;
    at pl.heavencraft.mcmenu.mcMenu.onCommand(mcMenu.java:36) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    ... 14 more
    That was it when I tried to call the skill's name, so it's a bit more funny.
     
  4. Offline

    Gater12

    Quasindro
    Is mcMMO in your plugins folder?
     
  5. Offline

    Quasindro

  6. Offline

    xTigerRebornx

    Quasindro Make sure you have added McMMO as a dependency in your plugin.yml
     
  7. Offline

    Quasindro

  8. Offline

    xTigerRebornx

    Quasindro According to McMMO's source-code, the method actually doesn't exist. Make sure you are building with the same version of McMMO in both your IDE and Server.
     
  9. Quasindro Are you using the same version in eclipse and plugins? It can't find the getSkillName method.
     
  10. Offline

    Quasindro

    xTigerRebornx AdamQpzm
    I got that code helplessly from the internet, alright? Don't care about it.

    Has anybody ever done this? Will I be a genius if I somehow get it done by myself? By the lack of response, I guess so.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page