From 4637bc8531271b677ad70f45c7a38fc6f340fe09 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Fri, 5 Aug 2016 14:31:13 -0400 Subject: [PATCH] Prevent war times from displaying as negative --- .../src/mineplex/game/clans/clans/war/WarManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java index 1892dae30..b8d681442 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java @@ -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)); } } }