fishing plugin: fix trawler timer with one tick left

This commit is contained in:
John Kryspin
2019-05-09 19:34:00 -04:00
committed by Adam
parent cd192087cc
commit 85e787c8dd

View File

@@ -396,6 +396,11 @@ public class FishingPlugin extends Plugin
}
long timeLeft = TRAWLER_TIME_LIMIT_IN_SECONDS - Duration.between(trawlerStartTime, Instant.now()).getSeconds();
if (timeLeft < 0)
{
timeLeft = 0;
}
int minutes = (int) timeLeft / 60;
int seconds = (int) timeLeft % 60;