EchoPet

EchoPet

882k Downloads

Command parse error

marlboromoo opened this issue ยท 1 comments

commented

EchoPet Version: 2.0.6
Bukkit Version: CraftBukkit version git-Spigot-1037 (MC: 1.6.2)

If a space between the pet type and the data type will produce the error like below, e.g "/pet hosrse: zombie"

2013-07-31 13:18:44 [INFO] AsakuraTaka issued server command: /pet horse: zombie
2013-07-31 13:18:44 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing 'pet horse: zombie' in com.github.dsh105.echopet.commands.CustomCommand(pet)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:194)
    at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:527)
    at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:981)
    at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:892)
    at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:839)
    at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49)
    at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230)
    at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:118)
    at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
    at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java:125)
    at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:592)
    at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:239)
    at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:481)
    at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:413)
    at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at com.github.dsh105.echopet.util.PetUtil.formPetFromArgs(PetUtil.java:101)
    at com.github.dsh105.echopet.commands.PetCommand.onCommand(PetCommand.java:381)
    at com.github.dsh105.echopet.commands.CustomCommand.execute(CustomCommand.java:18)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:190)
    ... 14 more
commented

Oh dear, again.

I'm actually surprised no-one's reported this before. It appears to have been an error since the start :\