diff --git a/CHANGELOG.md b/CHANGELOG.md index bc29c5a..050aeda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 3.1.1 +- Removed the logical error on items. + ### 3.1.0 - All of the commands are multi-threaded. - Made custom classes for custom methods. diff --git a/pom.xml b/pom.xml index ebdf6da..211c6f7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.gmail.zastrixarundell ToramBot - 3.1.0 + 3.1.1 diff --git a/src/main/java/com/github/zastrixarundell/torambot/commands/corynwebsite/Item.java b/src/main/java/com/github/zastrixarundell/torambot/commands/corynwebsite/Item.java index 3e2a091..56a0150 100644 --- a/src/main/java/com/github/zastrixarundell/torambot/commands/corynwebsite/Item.java +++ b/src/main/java/com/github/zastrixarundell/torambot/commands/corynwebsite/Item.java @@ -67,10 +67,14 @@ private ArrayList getItems(Element body) ArrayList listOfItems = new ArrayList<>(); - for(int count = 0; count < trs.size() && count < 5; count++) + for(int size = 0, count = 0; size < trs.size() && count < 5; size++) { - if(trs.get(count).parent() == body) - listOfItems.add(new ItemObject(trs.get(count))); + System.out.println(count + " " + trs.size()); + if(trs.get(size).parent() == body) + { + listOfItems.add(new ItemObject(trs.get(size))); + count++; + } } return listOfItems;