You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I am currently using your awesome api for Spigot for a project. However, when trying to get a resource (by ID) it gives me this error: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at be.maximvdw.spigotsite.jsoup.select.Elements.get(Elements.java:523) at be.maximvdw.spigotsite.resource.SpigotResourceManager.getResourceById(SpigotResourceManager.java:52) at be.maximvdw.spigotsite.resource.SpigotResourceManager.getResourceById(SpigotResourceManager.java:30) at me.spomg.system.bot.bridge.spigotsite.Spigot.getResources(Spigot.java:75) at me.spomg.system.bot.bridge.spigotsite.schedulers.NewBuyersScheduler.run(NewBuyersScheduler.java:36) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
The code used:
`public Set getResources() {
final Set value = new HashSet<>();
try {
for (String id : bot.getConfigFetcher().getStrings("resources")) {
value.add(getResourceManager().getResourceById(Integer.parseInt(id)));
}
} catch (ConnectionFailedException ex) {
LogHelper.logException("An error occurred while getting resources.", ex);
return null;
}
return value;
}`
I also tryed by using the method with a normal ID (and not using the config).
How do I fix this? Thanks!
The text was updated successfully, but these errors were encountered:
Hello! I am currently using your awesome api for Spigot for a project. However, when trying to get a resource (by ID) it gives me this error:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at be.maximvdw.spigotsite.jsoup.select.Elements.get(Elements.java:523) at be.maximvdw.spigotsite.resource.SpigotResourceManager.getResourceById(SpigotResourceManager.java:52) at be.maximvdw.spigotsite.resource.SpigotResourceManager.getResourceById(SpigotResourceManager.java:30) at me.spomg.system.bot.bridge.spigotsite.Spigot.getResources(Spigot.java:75) at me.spomg.system.bot.bridge.spigotsite.schedulers.NewBuyersScheduler.run(NewBuyersScheduler.java:36) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
The code used:
`public Set getResources() {
final Set value = new HashSet<>();
}`
I also tryed by using the method with a normal ID (and not using the config).
How do I fix this? Thanks!
The text was updated successfully, but these errors were encountered: