
Tab completion throws error when there are more arguments than the command takes
Yottazoid opened this issue ยท 2 comments
I got this error after typing '/to Home ', then trying to tab complete a second argument, even though the command does not take a second one.
[23:34:25 ERROR]: Exception when ToolaRoola attempted to tab complete to Home
org.bukkit.command.CommandException: Unhandled exception during tab completion for command '/to Home ' in plugin MyWarp v3.0-SNAPSHOT+jenkins-b177.git-f9f4abbdda
at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:144) ~[spigot.jar:git-Spigot-da42974-8f47214]
at org.bukkit.command.Command.tabComplete(Command.java:90) ~[spigot.jar:git-Spigot-da42974-8f47214]
at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:217) ~[spigot.jar:git-Spigot-da42974-8f47214]
at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:169) ~[spigot.jar:git-Spigot-da42974-8f47214]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.tabCompleteCommand(CraftServer.java:1617) [spigot.jar:git-Spigot-da42974-8f47214]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.tabComplete(CraftServer.java:1591) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.MinecraftServer.tabCompleteCommand(MinecraftServer.java:1127) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:2174) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.PacketPlayInTabComplete.a(SourceFile:52) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.PacketPlayInTabComplete.a(SourceFile:11) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-da42974-8f47214]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_144]
at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot.jar:git-Spigot-da42974-8f47214]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot.jar:git-Spigot-da42974-8f47214]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.lang.IndexOutOfBoundsException: index (1) must be less than size (1)
at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:1177) ~[spigot.jar:git-Spigot-da42974-8f47214]
at com.google.common.base.Preconditions.checkElementIndex(Preconditions.java:1159) ~[spigot.jar:git-Spigot-da42974-8f47214]
at com.google.common.collect.SingletonImmutableList.get(SingletonImmutableList.java:43) ~[spigot.jar:git-Spigot-da42974-8f47214]
at io.github.mywarp.mywarp.internal.intake.parametric.ArgumentParser.parseSuggestions(ArgumentParser.java:152) ~[?:?]
at io.github.mywarp.mywarp.internal.intake.parametric.AbstractParametricCallable.getSuggestions(AbstractParametricCallable.java:246) ~[?:?]
at io.github.mywarp.mywarp.internal.intake.dispatcher.SimpleDispatcher.getSuggestions(SimpleDispatcher.java:231) ~[?:?]
at io.github.mywarp.mywarp.command.CommandHandler.getSuggestions(CommandHandler.java:177) ~[?:?]
at io.github.mywarp.mywarp.bukkit.MyWarpPlugin.onTabComplete(MyWarpPlugin.java:223) ~[?:?]
at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:135) ~[spigot.jar:git-Spigot-da42974-8f47214]
... 18 more
Looks like an issue within Intake, the library MyWarp uses to handle commands.
I will look into it, thank you for reporting this.