use of net.dzikoysk.funnyguilds.config.tablist.TablistPage in project FunnyGuilds by FunnyGuilds.
the class IndividualPlayerList method send.
public void send() {
Map<Integer, String> unformattedCells = this.unformattedCells;
String header = this.header;
String footer = this.footer;
if (this.animated) {
this.cycle++;
int pageCycles = this.pages.get(this.currentPage).cycles;
if (this.cycle + 1 >= pageCycles) {
this.cycle = 0;
this.currentPage++;
if (this.currentPage >= this.pagesCount) {
this.currentPage = 0;
}
}
TablistPage page = this.pages.get(this.currentPage);
if (page != null) {
if (page.playerList != null) {
unformattedCells.putAll(page.playerList);
}
if (page.playerListHeader != null) {
header = page.playerListHeader;
}
if (page.playerListFooter != null) {
footer = page.playerListFooter;
}
}
}
String[] preparedCells = this.putVarsPrepareCells(unformattedCells, header, footer);
String preparedHeader = preparedCells[PlayerListConstants.DEFAULT_CELL_COUNT];
String preparedFooter = preparedCells[PlayerListConstants.DEFAULT_CELL_COUNT + 1];
SkinTexture[] preparedCellsTextures = this.putTexturePrepareCells();
this.user.getPlayer().peek(player -> this.playerList.send(player, preparedCells, preparedHeader, preparedFooter, preparedCellsTextures, this.cellPing, Collections.emptySet()));
}
Aggregations