I have loaded multiple different command from different extensions, and they are all giving this error:
> java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:359)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at net.minestom.server.command.CommandManager.createCommandNodes(CommandManager.java:348)
at net.minestom.server.command.CommandManager.serializeCommand(CommandManager.java:250)
at net.minestom.server.command.CommandManager.buildPacket(CommandManager.java:196)
at net.minestom.server.command.CommandManager.createDeclareCommandsPacket(CommandManager.java:170)
at net.minestom.server.entity.Player.refreshCommands(Player.java:461)
at net.minestom.server.entity.Player.UNSAFE_init(Player.java:281)
at net.minestom.server.network.ConnectionManager.lambda$updateWaitingPlayers$5(ConnectionManager.java:266)
at org.jctools.queues.MessagePassingQueueUtil.drain(MessagePassingQueueUtil.java:39)
at org.jctools.queues.BaseMpscLinkedArrayQueue.drain(BaseMpscLinkedArrayQueue.java:638)
at org.jctools.queues.MpscUnboundedArrayQueue.drain(MpscUnboundedArrayQueue.java:23)
at org.jctools.queues.MpscUnboundedArrayQueue.drain(MpscUnboundedArrayQueue.java:63)
at net.minestom.server.network.ConnectionManager.updateWaitingPlayers(ConnectionManager.java:256)
at net.minestom.server.ServerProcessImpl$TickerImpl.tick(ServerProcessImpl.java:283)
at net.minestom.server.thread.TickSchedulerThread.run(TickSchedulerThread.java:24)
Im taking the permission extension for example. This is the code to register the command:
private fun registerCommands() {
val commandManager = MinecraftServer.getCommandManager()
commandManager.register(PermissionCommand())
}
I have loaded multiple different command from different extensions, and they are all giving this error:
Im taking the permission extension for example. This is the code to register the command:
And this is the code of the command: