tebexio/Tebex-Minecraft

[Bukkit] Usage not shown on command syntax errors

andrewkm opened this issue · 6 comments

Paper 1.20.4 Build 388
Tebex-Minecraft compiled against 1440906

Error while running several commands:
https://i.imgur.com/CL9FqN8.png

Commands:

  • /tebex checkout
  • /tebex lookup
  • /tebex sendlink
  • /tebex ban

When adding a username to /tebex lookup :
https://i.imgur.com/TA5pcEy.png

Nothing is shown in console, not even with debug enabled:
https://i.imgur.com/qCzAHBQ.png

Same as #1

We think this is related to migrations from the previous plugin. Make sure that your secret key is appropriately set.

Use /tebex secret to set the key, or set directly in the plugin's configuration file. Afterwards restart the server and let us know if the issue continues.

Can confirm that this issue still persists even after following the guide above. /tebex info does start working after following the steps above but all the commands listed above still continue not to work including:

  • /tebex checkout
  • /tebex sendlink
  • /tebex report
[09:36:11 INFO]: ItIsGriff issued server command: /tebex report
[09:36:11 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'tebex' in plugin Tebex v2.0.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:1001) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:32) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:101) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:344) ~[?:?]
        at net.minecraft.commands.Commands.performCommand(Commands.java:331) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2305) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$17(ServerGamePacketListenerImpl.java:2265) ~[?:?]
        at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1485) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1462) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1385) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1363) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1247) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.4.jar:git-Purpur-2124]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at io.tebex.plugin.command.sub.ReportCommand.execute(ReportCommand.java:21) ~[tebex-bukkit-2.0.0.jar:?]
        at io.tebex.plugin.command.TebexCommand.onCommand(TebexCommand.java:41) ~[tebex-bukkit-2.0.0.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        ... 29 more
[09:33:48] [Server thread/INFO]: ItIsGriff issued server command: /tebex checkout
[09:33:48] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'tebex' in plugin Tebex v2.0.0
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:1001) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:32) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:101) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:344) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:331) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2305) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$17(ServerGamePacketListenerImpl.java:2265) ~[?:?]
	at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1485) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1462) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1385) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1363) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1247) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at io.tebex.plugin.command.sub.CheckoutCommand.execute(CheckoutCommand.java:24) ~[tebex-bukkit-2.0.0.jar:?]
	at io.tebex.plugin.command.TebexCommand.onCommand(TebexCommand.java:41) ~[tebex-bukkit-2.0.0.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	... 29 more
[09:35:58] [Server thread/INFO]: ItIsGriff issued server command: /tebex sendlink
[09:35:58] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'tebex' in plugin Tebex v2.0.0
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R3.CraftServer.dispatchCommand(CraftServer.java:1001) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:32) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.CommandQueueEntry.a(CommandQueueEntry.java:5) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:101) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:344) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:331) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2305) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$17(ServerGamePacketListenerImpl.java:2265) ~[?:?]
	at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1485) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1462) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1385) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1363) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1247) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.4.jar:git-Purpur-2124]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at io.tebex.plugin.command.sub.SendLinkCommand.execute(SendLinkCommand.java:20) ~[tebex-bukkit-2.0.0.jar:?]
	at io.tebex.plugin.command.TebexCommand.onCommand(TebexCommand.java:41) ~[tebex-bukkit-2.0.0.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
	... 29 more

Looks like we're not properly showing command usage instructions when command syntax is incorrect. In your case @itisgriff the arguments weren't provided to those commands. We should be showing usage when syntax is wrong.

Configs are properly set, we don't use secret key commands or any of that, we set our configs manually and everything is done correctly on our end.

Confirmed fixed.