Fix rank bonus page error when user has <6 entries
This commit is contained in:
parent
dc3c4d6850
commit
9307898d84
@ -50,9 +50,14 @@ public class SupportRankBonusPage extends SupportPage
|
||||
|
||||
private ItemStack getLogIcon()
|
||||
{
|
||||
int entries = 6;
|
||||
int entries = Math.min(6, getBonusLog().size());
|
||||
ItemBuilder builder = new ItemBuilder(Material.SIGN).setTitle(C.cGreenB + "Last " + entries + " Entries").addLore("");
|
||||
|
||||
if (entries == 0)
|
||||
{
|
||||
builder.addLore(C.mBody + "No entries to display.");
|
||||
}
|
||||
|
||||
for (int i = 0; i < entries; i++)
|
||||
{
|
||||
BonusEntry entry = getBonusLog().get(i);
|
||||
|
Loading…
Reference in New Issue
Block a user