1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixed Guide Settings showing "last activity" as a negative number

This commit is contained in:
TheBusyBiscuit 2020-11-19 21:00:28 +01:00
parent 9f1b8790aa
commit bb764b7584
2 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@
* Fixed #2447
* Fixed #2558
* Fixed a duplication bug with the Block Placer
* Fixed Slimefun Guide Settings showing "last activity" as a negative number
## Release Candidate 17 (17 Oct 2020)

View File

@ -130,7 +130,8 @@ public final class NumberUtils {
public static String getElapsedTime(@Nonnull LocalDateTime start, @Nonnull LocalDateTime end) {
Validate.notNull(start, "Provided start was null");
Validate.notNull(end, "Provided end was null");
long hours = Duration.between(start, end).toHours();
long hours = Duration.between(end, start).toHours();
if (hours == 0) {
return "< 1h";