HorseNuggets / TerminatorPlus

the epic plugin
Eclipse Public License 2.0
145 stars 53 forks source link

[Bug]: Exception is thrown when attempting to tab complete a typo/unknown subcommand #19

Open Badbird5907 opened 3 years ago

Badbird5907 commented 3 years ago

What happened?

try to do /bot a, an exception will occur

Plugin Version

3.1-BETA

Server Version

Purput 1.16.5

Relevant log output

[21:11:20 ERROR]: Exception when Badbird5907 attempted to tab complete bot a
org.bukkit.command.CommandException: Unhandled exception executing tab-completer for 'bot a ' in net.nuggetmc.tplus.command.commands.BotCommand(bot)
at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:263) ~[patched_1.16.5.jar:git-Purpur-1171]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.tabCompleteCommand(CraftServer.java:2003) ~[patched_1.16.5.jar:git-Purpur-1171]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.tabComplete(CraftServer.java:1975) ~[patched_1.16.5.jar:git-Purpur-1171]
at org.bukkit.craftbukkit.v1_16_R3.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:58) ~[patched_1.16.5.jar:git-Purpur-1171]
at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[patched_1.16.5.jar:git-Purpur-1171]
at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:597) ~[patched_1.16.5.jar:git-Purpur-1171]
at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:579) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.PlayerConnection.lambda$a$7(PlayerConnection.java:862) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1339) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1332) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1469) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1142) ~[patched_1.16.5.jar:git-Purpur-1171]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:293) ~[patched_1.16.5.jar:git-Purpur-1171]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.nuggetmc.tplus.command.CommandMethod.getAutofiller()" because "commandMethod" is null
at net.nuggetmc.tplus.command.CommandInstance.tabComplete(CommandInstance.java:84) ~[?:?]
at org.bukkit.command.Command.tabComplete(Command.java:93) ~[patched_1.16.5.jar:git-Purpur-1171]
at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:257) ~[patched_1.16.5.jar:git-Purpur-1171]
... 18 more
​

Additional Context

No response

Checklist

Badbird5907 commented 3 years ago

note: you need to do /bot a with a space after the a

Badbird5907 commented 3 years ago

video https://user-images.githubusercontent.com/50347938/130865607-bf6ad42e-7dfc-484f-8c28-9a642ef15655.mp4