-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
Fedora 21
-
PurpleIRC
Sending commands to the game via dispatchCommand() results in a NullPointerException.
[09:35:32 WARN]: [PurpleIRC] Task #7 for PurpleIRC v2.1.14-SNAPSHOT generated an exception
org.bukkit.command.CommandException: Unhandled exception executing 'list' in org.bukkit.craftbukkit.v1_8_R1.command.VanillaCommandWrapper(list)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:148) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:645) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at com.cnaude.purpleirc.CommandQueueWatcher.queueAndSend(CommandQueueWatcher.java:56) ~[?:?]
at com.cnaude.purpleirc.CommandQueueWatcher.access$000(CommandQueueWatcher.java:28) ~[?:?]
at com.cnaude.purpleirc.CommandQueueWatcher$1.run(CommandQueueWatcher.java:48) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:694) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:623) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:526) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Caused by: java.lang.NullPointerException
at org.bukkit.craftbukkit.v1_8_R1.command.VanillaCommandWrapper.dispatchVanillaCommand(VanillaCommandWrapper.java:61) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at org.bukkit.craftbukkit.v1_8_R1.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:42) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-52c130f-89944c0]
... 11 more
I am using my own CommandSender to retrieve the results of the command. This works without issues in CraftBukkit 1.7.9 and older.
public class IRCCommandSender implements CommandSender {