Factions Money API

Discussion in 'Plugin Development' started by xXkguyXx, Sep 28, 2016.

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

    xXkguyXx

    Hello everyone. I've encountered an issue attempting to use the factions API to access/set factions money balance. I've tried the following:

    Code:
    double monet = Money.get(mplayer.getFactionId());
    double monet = Money.get(mplayer.getFaction());
    double monet = Money.get(player);
    All seem to throw this error:
    Code:
    [16:38:25 ERROR]: Could not pass event InventoryCloseEvent to Shop v3.0
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-c.jar:git-PaperSpigot-"8b18730"]
            at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[spigot-c.jar:git-PaperSpigot-"8b18730"]
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-c.jar:git-PaperSpigot-"8b18730"]
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:852) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1438) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:18) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.PacketPlayInCloseWindow.a(PacketPlayInCloseWindow.java:1) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_101]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_101]
            at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:774) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [spigot-c.jar:git-PaperSpigot-"8b18730"]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
    Caused by: java.lang.IllegalArgumentException: extraction of accountId from object failed
            at com.massivecraft.massivecore.money.Money.accountId(Money.java:29) ~[?:?]
            at com.massivecraft.massivecore.money.Money.set(Money.java:241) ~[?:?]
            at com.fearpvp.shop.gui.Sell.attemptVoidChest(Sell.java:81) ~[?:?]
            at com.fearpvp.shop.gui.VoidChest.onClose(VoidChest.java:60) ~[?:?]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
            at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[spigot-c.jar:git-PaperSpigot-"8b18730"]
            ... 17 more
    Any help would be great, Thank you
     
  2. Offline

    xXkguyXx

  3. Offline

    Whoneedspacee

    Seems to be an error on the API's side from what I can see, but I'm not the best at this type of stuff.
     
  4. Offline

    xXkguyXx

    Hmm, Interesting I'll try an alternate version
     
Thread Status:
Not open for further replies.

Share This Page