mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 16:14:26 +08:00
Bugfixes
Fix #148 Fixed multiple PluginData issues Fixed ViaVersion being compiled into final jar Fixed GMTimesTable get multiple method Fixed Playerlist being sorted the wrong way (Oldest players shown instead of most recent)
This commit is contained in:
parent
b7963a1f03
commit
b0045077f6
@ -119,9 +119,9 @@ public class GMTimesTable extends Table {
|
||||
Map<Integer, Map<GameMode, Long>> times = new HashMap<>();
|
||||
try {
|
||||
statement = prepareStatement("SELECT * FROM " + tableName);
|
||||
set = statement.executeQuery();
|
||||
Map<GameMode, Long> gmTimes = new HashMap<>();
|
||||
set = statement.executeQuery();
|
||||
while (set.next()) {
|
||||
Map<GameMode, Long> gmTimes = new HashMap<>();
|
||||
int id = set.getInt(columnUserID);
|
||||
if (!userIds.contains(id)) {
|
||||
continue;
|
||||
|
@ -11,7 +11,6 @@ import main.java.com.djrapitops.plan.Plan;
|
||||
import main.java.com.djrapitops.plan.Settings;
|
||||
import main.java.com.djrapitops.plan.data.AnalysisData;
|
||||
import main.java.com.djrapitops.plan.data.UserData;
|
||||
import main.java.com.djrapitops.plan.utilities.Benchmark;
|
||||
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
|
||||
import main.java.com.djrapitops.plan.utilities.PlaceholderUtils;
|
||||
|
||||
@ -118,7 +117,7 @@ public class ExportUtility {
|
||||
}
|
||||
String analysisHtml = HtmlUtils.replacePlaceholders(HtmlUtils.getHtmlStringFromResource("analysis.html"),
|
||||
PlaceholderUtils.getAnalysisReplaceRules(analysisData))
|
||||
.replace(HtmlUtils.getInspectUrl(""), "./player/");
|
||||
.replace(HtmlUtils.getInspectUrl(""), "../player/");
|
||||
File analysisHtmlFile = new File(serverFolder, "index.html");
|
||||
if (analysisHtmlFile.exists()) {
|
||||
analysisHtmlFile.delete();
|
||||
|
@ -15,6 +15,6 @@ import main.java.com.djrapitops.plan.data.UserData;
|
||||
public class UserDataLastPlayedComparator implements Comparator<UserData> {
|
||||
@Override
|
||||
public int compare(UserData u1, UserData u2) {
|
||||
return Long.compare(u1.getLastPlayed(), u2.getLastPlayed());
|
||||
return Long.compare(u2.getLastPlayed(), u1.getLastPlayed());
|
||||
}
|
||||
}
|
||||
|
@ -114,6 +114,7 @@
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
|
@ -26,7 +26,7 @@ public class GriefPreventionHook extends Hook {
|
||||
* @throws NoClassDefFoundError when the plugin class can not be found.
|
||||
*/
|
||||
public GriefPreventionHook(HookHandler hookH) throws NoClassDefFoundError {
|
||||
super("me.ryanhamshire.GriefPrevention");
|
||||
super("me.ryanhamshire.GriefPrevention.GriefPrevention");
|
||||
if (enabled) {
|
||||
DataStore dataStore = getPlugin(GriefPrevention.class).dataStore;
|
||||
hookH.addPluginDataSource(new GriefPreventionClaims(dataStore));
|
||||
|
@ -29,7 +29,8 @@ public class SuperbVoteHook extends Hook {
|
||||
super("io.minimum.minecraft.superbvote.SuperbVote");
|
||||
if (enabled) {
|
||||
VoteStorage store = getPlugin(SuperbVote.class).getVoteStorage();
|
||||
hookH.addPluginDataSource(null);
|
||||
hookH.addPluginDataSource(new SuperbVoteVotes(store));
|
||||
hookH.addPluginDataSource(new SuperbVoteVotesTable(store));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class ViaVersionVersion extends PluginData {
|
||||
try {
|
||||
int protocolVersion = table.getProtocolVersion(uuid);
|
||||
if (protocolVersion == -1) {
|
||||
parseContainer(modifierPrefix, "Not Yet Known");
|
||||
return parseContainer(modifierPrefix, "Not Yet Known");
|
||||
}
|
||||
return parseContainer(modifierPrefix, Protocol.getMCVersion(protocolVersion));
|
||||
} catch (SQLException ex) {
|
||||
|
@ -48,9 +48,13 @@ public class ViaVersionVersionTable extends PluginData {
|
||||
StringBuilder html = new StringBuilder();
|
||||
|
||||
Map<String, Integer> usersPerVersion = getUsersPerVersion(html);
|
||||
usersPerVersion.entrySet().stream().map(e -> Html.TABLELINE_2.parse(e.getKey(), e.getValue() + "")).forEach(string -> {
|
||||
html.append(string);
|
||||
});
|
||||
if (usersPerVersion.isEmpty()) {
|
||||
html.append(Html.TABLELINE_2.parse("No joins after 3.5.0 install", ""));
|
||||
} else {
|
||||
usersPerVersion.entrySet().stream().map(e -> Html.TABLELINE_2.parse(e.getKey(), e.getValue() + "")).forEach(string -> {
|
||||
html.append(string);
|
||||
});
|
||||
}
|
||||
return html.toString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user