mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed Compile issues related to latest commit
This commit is contained in:
parent
b729f00a12
commit
86c4e36176
@ -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<Integer, String> serverNames = plugin.getDB().getServerTable().getServerNames();
|
||||
Map<Integer, String> serverNames = plugin.getDB().getServerTable().getServerNamesByID();
|
||||
for (Map.Entry<Integer, String> entry : serverNames.entrySet()) {
|
||||
sender.sendMessage(" " + tCol + entry.getKey() + sCol + " : " + entry.getValue());
|
||||
}
|
||||
|
@ -256,7 +256,6 @@ public abstract class SQLDB extends Database {
|
||||
profile.setSessions(sessions);
|
||||
profile.setTotalWorldTimes(worldTimesTable.getWorldTimesOfUser(uuid));
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ public class SessionsTable extends UserIDTable {
|
||||
* @throws SQLException DB Error
|
||||
*/
|
||||
public Map<String, Long> getPlaytimeByServer(UUID uuid, long afterDate) throws SQLException {
|
||||
Map<Integer, String> serverNames = serverTable.getServerNames();
|
||||
Map<Integer, String> serverNames = serverTable.getServerNamesByID();
|
||||
String sql = "SELECT " +
|
||||
"(SUM(" + columnSessionEnd + ") - SUM(" + columnSessionStart + ")) as playtime, " +
|
||||
columnServerID +
|
||||
|
@ -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<String, List<Session>> sessions = sessionsTable.getSessions(uuid);
|
||||
Map<UUID, List<Session>> sessions = sessionsTable.getSessions(uuid);
|
||||
List<Session> 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();
|
||||
|
||||
|
@ -416,14 +416,12 @@ public class DatabaseTest {
|
||||
|
||||
commitTest();
|
||||
|
||||
Map<String, List<Session>> sessions = sessionsTable.getSessions(uuid);
|
||||
Map<UUID, List<Session>> sessions = sessionsTable.getSessions(uuid);
|
||||
|
||||
for (Map.Entry<String, List<Session>> entry : sessions.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
for (Map.Entry<UUID, List<Session>> 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user