TrustyBee Posted February 20, 2015 Share Posted February 20, 2015 (edited) Hi liebe Minecraft-Community! Ich habe versucht, mir eine Methode zu programmieren, die alle Warps in meiner Config mit einer for-Schlaufe aufrufen und ausgeben. Das ganze wird mit "Seiten" verbunden, als Beispiel: "/warp list 2". Sobald jedoch die einträge auf der letzten Seite zu ende sind, wird ein Fehler geworfen. Kann mir da jemand erklären wo der Fehler liegt? Vor lauter Programmieren sehe ich ihn selber nicht mehr. Grüsse TrustyBee Java-Code: - Konsolenausgabe: [08:02:09 INFO]: Arktoron issued server command: /warp list 2 [08:02:09 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'warp ' in plugin Arkadia v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[cra ftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18 1) ~[craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServe r.java:643) ~[craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerCon nection.java:1083) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java :918) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java :26) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java :53) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [cra ftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [ ?:1.8.0_31] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_31] at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:6 86) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:3 16) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:6 27) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java :530) [craftbukkit.jar:git-Spigot-da32fe1-df0b4c1] at java.lang.Thread.run(Unknown Source) [?:1.8.0_31] Caused by: java.lang.IndexOutOfBoundsException: Index: 19, Size: 19 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_31] at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_31] at me.arktoron.arkadia.ArkadiaWarp.listWarps(ArkadiaWarp.java:106) ~[?:? ] at me.arktoron.arkadia.ArkadiaCmd.onCommand(ArkadiaCmd.java:77) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[cra ftbukkit.jar:git-Spigot-da32fe1-df0b4c1] ... 14 more > Okay das Thema hat sich gerade gelöst. Der Wert der auf den Array zugreift war grösser als die Liste selber...wie konnte mir so ein Fehler nur passieren... Edited February 20, 2015 by TrustyBee Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now