Skip to content

Commit aa06180

Browse files
authored
Merge branch '2.x' into task/new-sign-transaction-events
2 parents 92f7273 + 5bf158c commit aa06180

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Essentials/src/main/java/com/earth2me/essentials/commands/Commandbalancetop.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ public void run() {
128128
playtime = user.getBase().getStatistic(PLAY_ONE_TICK);
129129
}
130130
// Play time in seconds
131-
final long playTimeSecs = playtime / 20;
131+
final long playTimeSecs = Math.max(playtime / 20, 0);
132132

133133
// Checking if player meets the requirements of minimum balance and minimum playtime to be listed in baltop list
134134
if ((ess.getSettings().showZeroBaltop() || balance.compareTo(BigDecimal.ZERO) > 0)
135135
&& balance.compareTo(ess.getSettings().getBaltopMinBalance()) >= 0 &&
136-
playTimeSecs > ess.getSettings().getBaltopMinPlaytime()) {
136+
playTimeSecs >= ess.getSettings().getBaltopMinPlaytime()) {
137137
newCache.getLines().add(AdventureUtil.miniToLegacy(tlLiteral("balanceTopLine", pos, entry.getValue().getDisplayName(), AdventureUtil.parsed(NumberUtil.displayCurrency(balance, ess)))));
138138
}
139139
pos++;

0 commit comments

Comments
 (0)