graywolf336 / CasinoSlots

Animated, customizable, block-based slot machines, including audio, inside of Minecraft!
http://dev.bukkit.org/server-mods/casino-slots/
GNU General Public License v2.0
23 stars 24 forks source link

CommandException when looking up stats with statistics disabled. #77

Closed mibby closed 8 years ago

mibby commented 8 years ago

CasinoSlots dev 60

Error occurs in console when typing /casino stats with statistics disabled. Shouldn't you catch the exception and perhaps add a nicer output?

[23:42:53] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'casino' in plugin CasinoSlots v3.0.0-SNAPSHOT-b60
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.9.2.jar:git-Paper-720]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:146) ~[patched_1.9.2.jar:git-Paper-720]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchCommand(CraftServer.java:664) ~[patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.PlayerConnection.handleCommand(PlayerConnection.java:1388) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.PlayerConnection.a(PlayerConnection.java:1193) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.PlayerConnectionUtils$1.run(SourceFile:13) [patched_1.9.2.jar:git-Paper-720]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_92]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_92]
    at net.minecraft.server.v1_9_R1.SystemUtils.a(SourceFile:45) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:813) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:404) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:723) [patched_1.9.2.jar:git-Paper-720]
    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:622) [patched_1.9.2.jar:git-Paper-720]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.lang.NullPointerException
    at com.craftyn.casinoslots.command.CasinoStats.process(CasinoStats.java:27) ~[?:?]
    at com.craftyn.casinoslots.command.AnCommandExecutor.onCommand(AnCommandExecutor.java:32) ~[?:?]
    at com.craftyn.casinoslots.CasinoSlots.onCommand(CasinoSlots.java:175) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.9.2.jar:git-Paper-720]
    ... 15 more
graywolf336 commented 8 years ago

Closing this since development has drastically changed several things with v3 and things like this will be handled in a much cleaner way. 👍

mibby commented 8 years ago

@graywolf336 Ah, okay. Sounds good. :) Any planned ETA for when it'll be stable enough to begin testing on a live server?