Index out of bounds, Java bukkit plugin
Posted
by
Robby Duke
on Game Development
See other posts from Game Development
or by Robby Duke
Published on 2012-11-03T01:07:52Z
Indexed on
2012/11/03
5:27 UTC
Read the original article
Hit count: 434
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) + ", ";
}
}
© Game Development or respective owner