mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-08-19 03:42:50 +02:00
Fixes next arrow showing when there is nothing on next page
https://github.com/BentoBoxWorld/BentoBox/issues/904
This commit is contained in:
parent
c764444fa5
commit
b4d662843b
|
@ -104,7 +104,7 @@ public class TabbedPanel extends Panel implements PanelListener {
|
||||||
return true;
|
return true;
|
||||||
}).build());
|
}).build());
|
||||||
}
|
}
|
||||||
if ((page + 1) * 45 < items.size()) {
|
if ((page + 1) * 43L < panelItems.stream().filter(Objects::nonNull).count()) {
|
||||||
// Next page icon
|
// Next page icon
|
||||||
items.put(items.lastKey() + 1, new PanelItemBuilder().icon(Material.ARROW).name(tpb.getUser().getTranslation(PROTECTION_PANEL + "next")).clickHandler((panel, user1, clickType, slot1) -> {
|
items.put(items.lastKey() + 1, new PanelItemBuilder().icon(Material.ARROW).name(tpb.getUser().getTranslation(PROTECTION_PANEL + "next")).clickHandler((panel, user1, clickType, slot1) -> {
|
||||||
this.activePage++;
|
this.activePage++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user