Vault

Vault

7M Downloads

Economy not working after Vault update.

Trsak opened this issue ยท 2 comments

commented

Hi there,
many plugins cant hook to economy after Vault update, even when Vault shows that Craftconomy 3 is hooked:

[15:37:11 INFO]: Trsak issued server command: /spawn
[15:37:11 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'spawn' in plugin BasicCMDS v1.1.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[server.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[server.jar:git-Spigot-d97e08b-880a532]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-d97e08b-880a532]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45]
at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:714) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653) [server.jar:git-Spigot-d97e08b-880a532]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556) [server.jar:git-Spigot-d97e08b-880a532]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: java.lang.NullPointerException
at net.milkbowl.vault.economy.plugins.Economy_Craftconomy3.withdrawPlayer(Economy_Craftconomy3.java:294) ~[?:?]
at net.milkbowl.vault.economy.plugins.Economy_Craftconomy3.withdrawPlayer(Economy_Craftconomy3.java:125) ~[?:?]
at me.elijah.basiccmds.Main.onCommand(Main.java:443) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[server.jar:git-Spigot-d97e08b-880a532]
... 15 more

commented

As a admin, does "/money give your_username 30" crash? If yes, for some reason, you have no default currency. Do "/currency default currency_name" to fix it.

commented

The only way I'm seeing that this NPE can really happen here is from this line: Common.getInstance().getCurrencyManager().getDefaultCurrency().getName())

This would mean you don't have a default currency setup in craftconomy, CraftConomy didn't load/isn't setup yet, or the calling plugin is attempting to utilize a Vault method before the server is fully up. Last one is unlikely since it's loaded in and you're running commands.