Fixed offline-time not working (because it was miliseconds instead of seconds)
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ public class BungeeServer implements AdaptedServer {
|
|||||||
|
|
||||||
private void markOffline(boolean debug, QueueLogger logger, CompletableFuture<AdaptedServerPing> future, long sent, @Nullable Throwable e) {
|
private void markOffline(boolean debug, QueueLogger logger, CompletableFuture<AdaptedServerPing> future, long sent, @Nullable Throwable e) {
|
||||||
long lastOnline = lastSuccessfullPing == null ? 0 : lastSuccessfullPing.getFetchedTime();
|
long lastOnline = lastSuccessfullPing == null ? 0 : lastSuccessfullPing.getFetchedTime();
|
||||||
offlineTime = (int) Math.min(sent - lastOnline, Integer.MAX_VALUE);
|
offlineTime = (int) Math.min(sent - lastOnline, Integer.MAX_VALUE) / 1000;
|
||||||
|
|
||||||
lastOffline = sent;
|
lastOffline = sent;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@ public class VelocityServer implements AdaptedServer {
|
|||||||
|
|
||||||
private void markOffline(boolean debug, QueueLogger logger, CompletableFuture<AdaptedServerPing> future, long sent, Throwable e) {
|
private void markOffline(boolean debug, QueueLogger logger, CompletableFuture<AdaptedServerPing> future, long sent, Throwable e) {
|
||||||
long lastOnline = lastSuccessfullPing == null ? 0 : lastSuccessfullPing.getFetchedTime();
|
long lastOnline = lastSuccessfullPing == null ? 0 : lastSuccessfullPing.getFetchedTime();
|
||||||
offlineTime = (int) Math.min(sent - lastOnline, Integer.MAX_VALUE);
|
offlineTime = (int) Math.min(sent - lastOnline, Integer.MAX_VALUE) / 1000;
|
||||||
|
|
||||||
lastOffline = sent;
|
lastOffline = sent;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user