mirror of
https://github.com/songoda/EpicFarming.git
synced 2024-11-27 21:15:28 +01:00
fix index error
This commit is contained in:
parent
4b86dd16ee
commit
5ce5fc7a26
@ -60,7 +60,7 @@ public class OverviewGui extends Gui {
|
||||
|
||||
// enable page events
|
||||
if (level.getPages() > 1) {
|
||||
this.pages = level.getPages();
|
||||
setPages(level.getPages());
|
||||
setPrevPage(2, 0, GuiUtils.createButtonItem(CompatibleMaterial.ARROW, plugin.getLocale().getMessage("general.interface.previous").getMessage()));
|
||||
setNextPage(2, 8, GuiUtils.createButtonItem(CompatibleMaterial.ARROW, plugin.getLocale().getMessage("general.interface.next").getMessage()));
|
||||
setOnPage((event) -> updateInventory());
|
||||
@ -171,7 +171,7 @@ public class OverviewGui extends Gui {
|
||||
if (item != null && item.getType() != Material.AIR)
|
||||
items.add(item);
|
||||
} else {
|
||||
if (i > farm.getItems().size())
|
||||
if (i >= farm.getItems().size())
|
||||
continue;
|
||||
items.add(farm.getItems().get(i));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user