Reload command fails in console
shinji257 opened this issue ยท 4 comments
When attempting to do /fc reload it throws a stack trace. I tested on current dev builds.
2014-08-02 15:17:10 [WARNING] Unexpected exception while parsing console command
org.bukkit.command.CommandException: Unhandled exception executing command 'fc' in plugin FactionChat v1.792
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at forge.bukkit.ForgeCommandMap.dispatch(ForgeCommandMap.java:55)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:497)
at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:493)
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:625)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:593)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player
at nz.co.lolnet.james137137.FactionChat.FactionChat.CommandFC(FactionChat.java:512)
at nz.co.lolnet.james137137.FactionChat.FactionChat.onCommand(FactionChat.java:251)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 8 more
I can dig into it but I believe it is due to it thinking that console is a player?
I'm sorry. I never got around to checking this. I just checked 1.794 and fc reload isn't fixed. Still get an error... >.<
Actually it is a completely new error...
03:31:14 [WARNING] Unexpected exception while parsing console command
org.bukkit.command.CommandException: Unhandled exception executing command 'fc'
in plugin FactionChat v1.794
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at forge.bukkit.ForgeCommandMap.dispatch(ForgeCommandMap.java:55)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:497)
at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:493)
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:625)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:593)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.NullPointerException
at com.massivecraft.factions.zcore.persist.PlayerEntityCollection.get(PlayerEntityCollection.java:33)
at nz.co.lolnet.james137137.FactionChat.ChatChannel.getFactionName(ChatChannel.java:49)
at nz.co.lolnet.james137137.FactionChat.FactionChat.CommandFC(FactionChat.java:583)
at nz.co.lolnet.james137137.FactionChat.FactionChat.onCommand(FactionChat.java:258)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 8 more
Happens even when it is just /fc.
Looks like the original error happens on the other commands as well. I'm going to try to work up a patch for you. I sync'd my main branch with yours and re-branched again so I can work on it.
EDIT: Appears that it may only affect older versions of Minecraft (like 1.2.5). Works fine with Spigot (current releases) and an up to date Factions jar so I'm not sure what's going on.
Please leave this ticket closed. If I happen to fix it I'll submit a push request.
should be fixed now. as of commit: f98d341
feel free to close this