From d10aaa46d0261579e8a611cb3339a4428f3b8ba3 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 25 Aug 2019 11:31:54 +0300 Subject: [PATCH] Added ms unit to ping table --- .../java/com/djrapitops/plan/system/json/JSONFactory.java | 6 +++--- .../src/test/java/com/djrapitops/plan/db/DatabaseTest.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/system/json/JSONFactory.java b/Plan/common/src/main/java/com/djrapitops/plan/system/json/JSONFactory.java index c8a18d7f1..d8b52f3c6 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/system/json/JSONFactory.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/system/json/JSONFactory.java @@ -192,9 +192,9 @@ public class JSONFactory { Map tableEntry = new HashMap<>(); tableEntry.put("country", geolocation); - tableEntry.put("avg_ping", ping.getAverage()); - tableEntry.put("min_ping", ping.getMin()); - tableEntry.put("max_ping", ping.getMax()); + tableEntry.put("avg_ping", formatters.decimals().apply(ping.getAverage()) + " ms"); + tableEntry.put("min_ping", ping.getMin() + " ms"); + tableEntry.put("max_ping", ping.getMax() + " ms"); tableEntries.add(tableEntry); } return tableEntries; diff --git a/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java b/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java index e1ceda45b..5b54f0451 100644 --- a/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java +++ b/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java @@ -864,7 +864,7 @@ public interface DatabaseTest { OptionalAssert.equals(1, container.getValue(PlayerKeys.KICK_COUNT)); List expectedGeoInfo = - Collections.singletonList(new GeoInfo("1.2.3.4", "TestLoc", 223456789)); + Collections.singletonList(new GeoInfo("", "TestLoc", 223456789)); OptionalAssert.equals(expectedGeoInfo, container.getValue(PlayerKeys.GEO_INFO)); List expectedNicknames = Collections.singletonList(new Nickname("TestNick", -1, serverUUID()));