ervinchai / VoxelSniper

The premier long-distance brush editor for Minecraft, rebooted!
38 stars 27 forks source link

/vi tabcompletion causes exception #6

Closed StealWonders closed 4 years ago

StealWonders commented 4 years ago

When typing any (or none) character after the /vi command in chat you get an internal tab-completion error.

[14:09:06 ERROR]: Exception when StealWonders attempted to tab complete vi org.bukkit.command.CommandException: Unhandled exception during tab completion for command '/vi ' in plugin VoxelSniper v6.1.1 at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:150) ~[patched_1.15.2.jar:git-Paper-143] at org.bukkit.command.Command.tabComplete(Command.java:93) ~[patched_1.15.2.jar:git-Paper-143] at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:244) ~[patched_1.15.2.jar:git-Paper-143] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.tabCompleteCommand(CraftServer.java:1757) ~[patched_1.15.2.jar:git-Paper-143] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.tabComplete(CraftServer.java:1729) ~[patched_1.15.2.jar:git-Paper-143] at org.bukkit.craftbukkit.v1_15_R1.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:49) ~[patched_1.15.2.jar:git-Paper-143] at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[patched_1.15.2.jar:git-Paper-143] at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:596) ~[patched_1.15.2.jar:git-Paper-143] at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:579) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.PlayerConnection.lambda$a$3(PlayerConnection.java:566) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.PlayerConnection$$Lambda$3948/0000000000000000.run(Unknown Source) ~[?:?] at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1038) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1031) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1015) ~[patched_1.15.2.jar:git-Paper-143] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:938) ~[patched_1.15.2.jar:git-Paper-143] at java.lang.Thread.run(Thread.java:821) [?:1.8.0_242] Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1 at com.thevoxelbox.voxelsniper.command.VoxelInkCommand.doSuggestion(VoxelInkCommand.java:83) ~[?:?] at com.thevoxelbox.voxelsniper.command.VoxelCommand.onTabComplete(VoxelCommand.java:56) ~[?:?] at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:141) ~[patched_1.15.2.jar:git-Paper-143] ... 20 more

ghost commented 4 years ago

Thanks for your submission. Will look into it.

I think it's caused by the voxel material not having any possible data values. Can you try using something with data values like WHEAT and see if the error is still happening?

Thanks!

StealWonders commented 4 years ago

When I chose minecraft:wheat as my voxel and then use /vi I get 0 errors.

ghost commented 4 years ago

Fixed in VoxelSniper v6.1.2