diff --git a/Plan/src/main/java/com/djrapitops/plan/command/commands/ListServersCommand.java b/Plan/src/main/java/com/djrapitops/plan/command/commands/ListServersCommand.java index 0c87eef49..c2d17c4c1 100644 --- a/Plan/src/main/java/com/djrapitops/plan/command/commands/ListServersCommand.java +++ b/Plan/src/main/java/com/djrapitops/plan/command/commands/ListServersCommand.java @@ -45,7 +45,7 @@ public class ListServersCommand extends SubCommand { String tCol = colorScheme.getTertiaryColor(); try { sender.sendMessage(Locale.get(Msg.CMD_CONSTANT_FOOTER).toString() + mCol + " Servers"); - Map serverNames = plugin.getDB().getServerTable().getServerNames(); + Map serverNames = plugin.getDB().getServerTable().getServerNamesByID(); for (Map.Entry entry : serverNames.entrySet()) { sender.sendMessage(" " + tCol + entry.getKey() + sCol + " : " + entry.getValue()); } 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 8ae546dc1..d19391273 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 @@ -256,7 +256,6 @@ public abstract class SQLDB extends Database { profile.setSessions(sessions); profile.setTotalWorldTimes(worldTimesTable.getWorldTimesOfUser(uuid)); - return null; } diff --git a/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java b/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java index 55658f601..d9d53f604 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java @@ -286,7 +286,7 @@ public class SessionsTable extends UserIDTable { * @throws SQLException DB Error */ public Map getPlaytimeByServer(UUID uuid, long afterDate) throws SQLException { - Map serverNames = serverTable.getServerNames(); + Map serverNames = serverTable.getServerNamesByID(); String sql = "SELECT " + "(SUM(" + columnSessionEnd + ") - SUM(" + columnSessionStart + ")) as playtime, " + columnServerID + diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java index 780ebe971..485b28ab4 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/parsing/InspectPageParser.java @@ -96,16 +96,16 @@ public class InspectPageParser extends PageParser { addValue("nicknames", HtmlStructure.createDotList(nicknames.toArray(new String[nicknames.size()]))); addValue("geolocations", HtmlStructure.createDotList(geolocations.toArray(new String[geolocations.size()]))); - Map> sessions = sessionsTable.getSessions(uuid); + Map> sessions = sessionsTable.getSessions(uuid); List allSessions = sessions.values().stream() .flatMap(Collection::stream) .sorted(new SessionStartComparator()) // Sorted Newest first. .collect(Collectors.toList()); - String[] sessionsTabContent = HtmlStructure.createSessionsTabContentInspectPage(sessions, allSessions, uuid); - addValue("contentSessions", sessionsTabContent[0]); - addValue("sessionTabGraphViewFunctions", sessionsTabContent[1]); - addValue("contentServerOverview", HtmlStructure.createServerOverviewColumn(sessions)); +// String[] sessionsTabContent = HtmlStructure.createSessionsTabContentInspectPage(sessions, allSessions, uuid); +// addValue("contentSessions", sessionsTabContent[0]); +// addValue("sessionTabGraphViewFunctions", sessionsTabContent[1]); +// addValue("contentServerOverview", HtmlStructure.createServerOverviewColumn(sessions)); long now = MiscUtils.getTime(); diff --git a/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java b/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java index cd1f24352..86db5a5b1 100644 --- a/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java +++ b/Plan/test/main/java/com/djrapitops/plan/database/DatabaseTest.java @@ -416,14 +416,12 @@ public class DatabaseTest { commitTest(); - Map> sessions = sessionsTable.getSessions(uuid); + Map> sessions = sessionsTable.getSessions(uuid); - for (Map.Entry> entry : sessions.entrySet()) { - String key = entry.getKey(); + for (Map.Entry> entry : sessions.entrySet()) { + UUID key = entry.getKey(); if (key == null) { System.out.print("null"); - } else if (key.isEmpty()) { - System.out.print("empty"); } else { System.out.print(key); }