Fixes to RankBonusPage

This commit is contained in:
Spencer 2018-01-05 20:41:23 -05:00 committed by Alexander Meech
parent f9263b38be
commit c26831614c

View File

@ -30,25 +30,21 @@ public class SupportRankBonusPage extends SupportPage
getBonusLog().sort((a, b) -> Long.compare(b.getCalendar().getTimeInMillis(), a.getCalendar().getTimeInMillis()));
_multiPageManager = new MultiPageManager<>(
this,
this::getBonusLog,
(Pair<BonusEntry, Integer> pair) -> this.buildEntry(pair.getLeft(), pair.getRight())
);
_multiPageManager = new MultiPageManager<>(this, this::getBonusLog, this::buildEntry);
buildPage();
}
private List<BonusEntry> getBonusLog()
{
return getShop().getBonusLog(_target.getAccountId());
return getShop().getBonusLog().get(_target.getAccountId());
}
private void buildEntry(BonusEntry entry, int slot)
{
addItem(slot, new ShopItem(Material.BOOK, new SimpleDateFormat("MMMM").format(entry.getCalendar().getTime()), new String[] {
"",
C.cGray + "Time: " + C.cYellow + new SimpleDateFormat("MMMM dd YYYY, KK:mm aa").format(entry.getCalendar().getTime()),
C.cGray + "Time: " + C.cYellow + new SimpleDateFormat("MMMM dd YYYY").format(entry.getCalendar().getTime()),
C.cGray + "Item Received: " + C.cYellow + entry.getItemName(),
C.cGray + "Amount Received: " + C.cYellow + entry.getItemCount()
}, entry.getCalendar().get(Calendar.MONTH) + 1, false, true));