Index out of bounds, Java bukkit plugin
- by Robby Duke
I'm getting index out of bounds errors in my Bukkit plugin, and it's really beginning to piss me off...
I for the life of me can't figure this issue out!
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
This is where I believe the code to be erroring...
for(int i = 0; i <= staffOnline.size(); i++) {
if(i == staffOnline.size()) {
staffList = staffList + staffOnline.get(i);
} else {
staffList = staffList + staffOnline.get(i) + ", ";
}
}