Prevent war times from displaying as negative

This commit is contained in:
AlexTheCoder 2016-08-05 14:31:13 -04:00
parent 223fb0e526
commit 4637bc8531

View File

@ -334,7 +334,7 @@ public class WarManager extends MiniPlugin implements ScoreboardElement
element.add(" ");
element.add(C.cPurpleB + "Besieging");
element.add(" " + siege.getBesiegedClan());
element.add(" " + UtilTime.convertString(siege.getTimeLeft(), 1, UtilTime.TimeUnit.FIT));
element.add(" " + UtilTime.convertString(Math.max(siege.getTimeLeft(), 0), 1, UtilTime.TimeUnit.FIT));
}
}
@ -345,7 +345,7 @@ public class WarManager extends MiniPlugin implements ScoreboardElement
element.add(" ");
element.add(C.cRedB + "Besieged");
element.add(" " + siege.getBesiegingClan());
element.add(" " + UtilTime.convertString(siege.getTimeLeft(), 1, UtilTime.TimeUnit.FIT));
element.add(" " + UtilTime.convertString(Math.max(siege.getTimeLeft(), 0), 1, UtilTime.TimeUnit.FIT));
}
}
}