diff --git a/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanWorldChangeListener.java b/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanWorldChangeListener.java index d3903c9ce..543d0a086 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanWorldChangeListener.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/listeners/PlanWorldChangeListener.java @@ -30,6 +30,6 @@ public class PlanWorldChangeListener implements Listener { } UUID uuid = p.getUniqueId(); long time = MiscUtils.getTime(); - handler.addToPool(new PlaytimeDependentInfo(uuid, InfoType.GM, time, p.getGameMode().name(), p.getWorld().getName())); + handler.addToPool(new PlaytimeDependentInfo(uuid, InfoType.WORLD, time, p.getGameMode().name(), p.getWorld().getName())); } } diff --git a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java index d1cb99162..c6a824273 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java @@ -344,7 +344,11 @@ public abstract class SQLDB extends Database { Map gmTimes = gmTimesTable.getGMTimes(userId); data.getGmTimes().setTimes(gmTimes); Map worldTimes = worldTimesTable.getWorldTimes(userId); - data.getWorldTimes().setTimes(worldTimes); + WorldTimes worldT = data.getWorldTimes(); + worldT.setTimes(worldTimes); + if (worldT.getLastStateChange() == 0) { + worldT.setLastStateChange(data.getPlayTime()); + } List sessions = sessionsTable.getSessionData(userId); data.addSessions(sessions); @@ -394,13 +398,19 @@ public abstract class SQLDB extends Database { UUID uuid = uData.getUuid(); Integer id = userIds.get(uuid); uData.addIpAddresses(ipList.get(id)); - List nickNames = nicknames.get(id); - uData.addNicknames(nickNames); - uData.setLastNick(nickNames.get(nickNames.size()-1)); + List userNicks = nicknames.get(id); + uData.addNicknames(userNicks); + if (!userNicks.isEmpty()) { + uData.setLastNick(userNicks.get(userNicks.size() - 1)); + } uData.addSessions(sessionData.get(id)); uData.setPlayerKills(playerKills.get(id)); uData.getGmTimes().setTimes(gmTimes.get(id)); - uData.getWorldTimes().setTimes(worldTimes.get(id)); + WorldTimes worldT = uData.getWorldTimes(); + worldT.setTimes(worldTimes.get(id)); + if (worldT.getLastStateChange() == 0) { + worldT.setLastStateChange(uData.getPlayTime()); + } } Benchmark.stop("Database: Get UserData for " + uuidsCol.size()); diff --git a/Plan/src/main/java/com/djrapitops/plan/ui/webserver/WebServer.java b/Plan/src/main/java/com/djrapitops/plan/ui/webserver/WebServer.java index 7ab6395aa..0bd9c6dbe 100644 --- a/Plan/src/main/java/com/djrapitops/plan/ui/webserver/WebServer.java +++ b/Plan/src/main/java/com/djrapitops/plan/ui/webserver/WebServer.java @@ -20,6 +20,7 @@ import javax.net.ssl.*; import java.io.*; import java.net.InetSocketAddress; import java.net.URI; +import java.nio.file.Paths; import java.security.*; import java.security.cert.Certificate; import java.security.cert.CertificateException; @@ -169,7 +170,7 @@ public class WebServer { private boolean startHttpsServer() throws IOException { String keyStorePath = Settings.WEBSERVER_CERTIFICATE_PATH.toString(); - if (!keyStorePath.contains(":")) { + if (!Paths.get(keyStorePath).isAbsolute()) { keyStorePath = plugin.getDataFolder() + keyStorePath; } char[] storepass = Settings.WEBSERVER_CERTIFICATE_STOREPASS.toString().toCharArray(); diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/ExportUtility.java b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/ExportUtility.java index 024ec1f28..0e26f9a31 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/ExportUtility.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/ExportUtility.java @@ -13,6 +13,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.Paths; import java.util.Collections; import java.util.List; @@ -34,7 +35,7 @@ public class ExportUtility { */ public static File getFolder() { String path = Settings.ANALYSIS_EXPORT_PATH.toString(); - if (path.contains(":")) { + if (Paths.get(path).isAbsolute()) { File folder = new File(path); if (folder.exists() && folder.isDirectory()) { diff --git a/Plan/src/main/resources/player.html b/Plan/src/main/resources/player.html index 728906c7a..f111fd04a 100644 --- a/Plan/src/main/resources/player.html +++ b/Plan/src/main/resources/player.html @@ -412,7 +412,7 @@
Last 10 Kills
+ class="header-text"> Last 25 Kills
@@ -490,6 +490,33 @@