Skip to content

Commit

Permalink
* Tablist enable method now responds to multiple tab groups instead o…
Browse files Browse the repository at this point in the history
…f the first encountered.
  • Loading branch information
Hempfest committed Feb 4, 2022
1 parent 2202fd4 commit b00ca8a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public boolean enable(Consumer<Player> consumer, TimeUnit unit, long period) {
return;
}

getGroups().stream().filter(TabGroup::isActive).findFirst().ifPresent(tabGroup -> {
getGroups().stream().filter(TabGroup::isActive).forEach(tabGroup -> {
tabGroup.nextDisplayIndex(TabInfo.HEADER);
tabGroup.nextDisplayIndex(TabInfo.FOOTER);
getHolder().setPlayerListHeaderFooter(StringUtils.use(tabGroup.getHeader(tabGroup.getCurrentHeaderIndex()).toString()).translate(getHolder()), StringUtils.use(tabGroup.getFooter(tabGroup.getCurrentFooterIndex()).toString()).translate(getHolder()));
Expand Down

0 comments on commit b00ca8a

Please sign in to comment.