Error when executing "s" command
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)
This server is running Purpur version git-Purpur-1759 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 0fd6a56 on HEAD)
Hello,
When executing the /s command with an argument (for example a "t" or a nickname),
an error occurs in the console and a message is displayed in game.
Other than that, very good plugin. Keep going !!
Unhandled exception executing command 's' in plugin MCCosmetics v0.9.0-${CI_COMMIT_SHORT_SHA}
org.bukkit.command.CommandException: Unhandled exception executing command 's' in plugin MCCosmetics v0.9.0-${CI_COMMIT_SHORT_SHA}
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:737) ~[EssentialsX-2.20.0.jar:?]
at com.earth2me.essentials.Essentials.onCommand(Essentials.java:723) ~[EssentialsX-2.20.0.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:942) ~[purpur-1.19.2.jar:git-Purpur-1759]
at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.2.jar:git-Purpur-1759]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.2.jar:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:311) ~[?:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:295) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2387) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2341) ~[?:?]
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.19.2.jar:git-Purpur-1759]
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:1387) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1364) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1357) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1335) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1223) ~[purpur-1.19.2.jar:git-Purpur-1759]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1759]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at io.lumine.cosmetics.commands.SprayCommand.onCommand(SprayCommand.java:29) ~[MCCosmetics.jar:?]
at io.lumine.cosmetics.utils.commands.Command.onCommand(Command.java:64) ~[MCCosmetics.jar:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
... 26 more```