Code: [14:23:14 INFO]: bwfcwalshy issued server command: /kickstarter browse [14:23:14 ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'kick starter' in plugin Kickstarter v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[cus tom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18 0) ~[custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe r.java:701) ~[custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerCon nection.java:956) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java :817) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java :28) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat .java:47) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157 ) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [cust om.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:6 67) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2 60) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5 58) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java :469) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6 28) [custom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.7.0_51] at java.util.ArrayList.get(Unknown Source) ~[?:1.7.0_51] at com.bwfcwalshy.kickstarter.Kickstarter.onCommand(Kickstarter.java:249 ) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[cus tom.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] ... 13 more There is the stacktrace need any lines of code just ask.
bwfcwalshy (It's as if no one ever reads the how to read stacktraces) http://forums.bukkit.org/threads/ho...ubleshoot-your-own-plugins-by-yourself.32457/ at com.bwfcwalshy.kickstarter.Kickstarter.onCommand(Kickstarter.java:249 ) ~[?:?] Line 249
DJSkepter Well here is the full classes: Kickstarter http://pastebin.com/bxv8TH6h Project http://pastebin.com/wT0h84Cz ProjectManager http://pastebin.com/F3kJ0GWV
bwfcwalshy You forgot to check if the project actually exists in the List. To prevent such issues, rather move the math outside of the for loop. Code: // Assuming nothing, 0 and 1 are all page 1 begin = (page - 1)*10; // Since the start is 'equivalent to index 0', adding 9 would be equivalent to the 10th item end = max(begin + 9, list.size()-1) // Verify that begin < end! Then loop from begin till begin <= end
DJSkepter Yes. But a lot of the people that was targeted at do not read sticky threads and do not search for the solution.