mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-05 10:20:23 +01:00
One missing world color consistency addition
This commit is contained in:
parent
417aac3f78
commit
96f034da9f
@ -13,6 +13,8 @@ import main.java.com.djrapitops.plan.data.Action;
|
|||||||
import main.java.com.djrapitops.plan.data.PlayerKill;
|
import main.java.com.djrapitops.plan.data.PlayerKill;
|
||||||
import main.java.com.djrapitops.plan.data.Session;
|
import main.java.com.djrapitops.plan.data.Session;
|
||||||
import main.java.com.djrapitops.plan.data.UserInfo;
|
import main.java.com.djrapitops.plan.data.UserInfo;
|
||||||
|
import main.java.com.djrapitops.plan.data.time.GMTimes;
|
||||||
|
import main.java.com.djrapitops.plan.data.time.WorldTimes;
|
||||||
import main.java.com.djrapitops.plan.database.Database;
|
import main.java.com.djrapitops.plan.database.Database;
|
||||||
import main.java.com.djrapitops.plan.database.tables.SessionsTable;
|
import main.java.com.djrapitops.plan.database.tables.SessionsTable;
|
||||||
import main.java.com.djrapitops.plan.database.tables.UsersTable;
|
import main.java.com.djrapitops.plan.database.tables.UsersTable;
|
||||||
@ -154,7 +156,18 @@ public class InspectPageParser extends PageParser {
|
|||||||
addValue("playtimeTotal", FormatUtils.formatTimeAmount(playTime));
|
addValue("playtimeTotal", FormatUtils.formatTimeAmount(playTime));
|
||||||
|
|
||||||
String punchCardData = PunchCardGraphCreator.createDataSeries(allSessions);
|
String punchCardData = PunchCardGraphCreator.createDataSeries(allSessions);
|
||||||
String[] worldPieData = WorldPieCreator.createSeriesData(db.getWorldTimesTable().getWorldTimesOfUser(uuid));
|
WorldTimes worldTimes = db.getWorldTimesTable().getWorldTimesOfUser(uuid);
|
||||||
|
|
||||||
|
// Add 0 time for worlds not present.
|
||||||
|
Set<String> nonZeroWorlds = worldTimes.getWorldTimes().keySet();
|
||||||
|
for (String world : db.getWorldTable().getWorlds()) {
|
||||||
|
if (nonZeroWorlds.contains(world)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
worldTimes.setGMTimesForWorld(world, new GMTimes());
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] worldPieData = WorldPieCreator.createSeriesData(worldTimes);
|
||||||
|
|
||||||
addValue("worldPieSeries", worldPieData[0]);
|
addValue("worldPieSeries", worldPieData[0]);
|
||||||
addValue("gmSeries", worldPieData[1]);
|
addValue("gmSeries", worldPieData[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user