servertap-io / servertap

ServerTap is a REST API for Bukkit/Spigot/Paper Minecraft servers
https://servertap.io
MIT License
226 stars 57 forks source link

Uncaught Exception - Error occurred while executing a command #257

Closed DeadIntermediate closed 11 months ago

DeadIntermediate commented 11 months ago

I got an error when trying to do test alerts from TikFinity. I have a custom command that gives me any item, which is rig all. Which just gives all players 1 random item for everytime it's executed in console.

This the error I got:

[21:44:59] [Server thread/INFO]: - Essentials, Rig, ServerTap [21:49:39] [pool-15-thread-1/WARN]: [io.javalin.Javalin] Uncaught exception java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command at io.servertap.api.v1.ServerApi.lambda$postCommand$7(ServerApi.java:663) ~[ServerTap-0.5.3.jar:?] at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?] at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?] at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:41) ~[ServerTap-0.5.3.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) ~[?:?] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) ~[?:?] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708) ~[?:?] ... 9 more Caused by: java.lang.RuntimeException: An error occurred while executing command ... 7 more Caused by: java.util.concurrent.ExecutionException: org.bukkit.command.CommandException: Unhandled exception executing 'execute at @a run zombie 5 ~ ~2 ~ {CustomName:"\"Testuser123\""}' in org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper(execute) at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.get(CraftFuture.java:73) ~[paper-1.20.1.jar:git-Paper-194] at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:38) ~[ServerTap-0.5.3.jar:?] ... 6 more Caused by: org.bukkit.command.CommandException: Unhandled exception executing 'execute at @a run zombie 5 ~ ~2 ~ {CustomName:"\"Testuser123\""}' in org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper(execute) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:985) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:1063) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap-0.5.3.jar:?] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1479) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194] ... 1 more Caused by: java.lang.ClassCastException: class io.servertap.ServerExecCommandSender cannot be cast to class org.bukkit.craftbukkit.v1_20_R1.command.CraftRemoteConsoleCommandSender (io.servertap.ServerExecCommandSender is in unnamed module of loader 'ServerTap-0.5.3.jar' @47f899f3; org.bukkit.craftbukkit.v1_20_R1.command.CraftRemoteConsoleCommandSender is in unnamed module of loader java.net.URLClassLoader @2b71fc7e) at org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper.getListener(VanillaCommandWrapper.java:78) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:44) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:985) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:1063) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap-0.5.3.jar:?] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1479) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194] ... 1 more [21:50:36] [pool-15-thread-1/WARN]: [io.javalin.Javalin] Uncaught exception java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command at io.servertap.api.v1.ServerApi.lambda$postCommand$7(ServerApi.java:663) ~[ServerTap-0.5.3.jar:?] at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?] at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?] at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?] at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:41) ~[ServerTap-0.5.3.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: An error occurred while executing command at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) ~[?:?] at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) ~[?:?] at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:708) ~[?:?] ... 9 more Caused by: java.lang.RuntimeException: An error occurred while executing command ... 7 more Caused by: java.util.concurrent.ExecutionException: org.bukkit.command.CommandException: Unhandled exception executing 'execute at @a run zombie 5 ~ ~2 ~ {CustomName:"\"Testuser123\""}' in org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper(execute) at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.get(CraftFuture.java:73) ~[paper-1.20.1.jar:git-Paper-194] at io.servertap.ServerExecCommandSender.lambda$executeCommand$1(ServerExecCommandSender.java:38) ~[ServerTap-0.5.3.jar:?] ... 6 more Caused by: org.bukkit.command.CommandException: Unhandled exception executing 'execute at @a run zombie 5 ~ ~2 ~ {CustomName:"\"Testuser123\""}' in org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper(execute) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:985) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:1063) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap-0.5.3.jar:?] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1479) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194] ... 1 more Caused by: java.lang.ClassCastException: class io.servertap.ServerExecCommandSender cannot be cast to class org.bukkit.craftbukkit.v1_20_R1.command.CraftRemoteConsoleCommandSender (io.servertap.ServerExecCommandSender is in unnamed module of loader 'ServerTap-0.5.3.jar' @47f899f3; org.bukkit.craftbukkit.v1_20_R1.command.CraftRemoteConsoleCommandSender is in unnamed module of loader java.net.URLClassLoader @2b71fc7e) at org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper.getListener(VanillaCommandWrapper.java:78) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:44) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:985) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:1063) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.servertap.ServerExecCommandSender.lambda$executeCommand$0(ServerExecCommandSender.java:32) ~[ServerTap-0.5.3.jar:?] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftFuture.run(CraftFuture.java:88) ~[paper-1.20.1.jar:git-Paper-194] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1479) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-194] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194] ... 1 more

Velyn-N commented 11 months ago

This is an Issue in newer Paper Versions. Please go back to Paper 160 until we can release a new version with a fix for the problem.

DeadIntermediate commented 11 months ago

Thanks, I will do that.