feat: remove leaderboard and username logging

This commit is contained in:
Ryan Dowling 2020-05-02 17:36:15 +10:00
parent a508ec8c90
commit e9c68dbd73
No known key found for this signature in database
GPG key ID: 5539FCDB88950EFD
10 changed files with 9 additions and 99 deletions

View file

@ -1,7 +1,5 @@
# Changelog
## 3.3.4.5
## 3.3.4.6
- Fix Java 14 not working with Pack200 (#383)
- Switch news tab to new source and file
- Allow OS/arch specific launcher file downloads
- Remove leaderboard and username logging

View file

@ -82,8 +82,8 @@ version of the launcher. See the 'Versioning System' section below.
### API_BASE_URL
This is a link to your server side API for processing of leaderboard times and pack installs. This
is optional and can be removed. We do not give implementation code, this is your own doing.
This is a link to your server side API for processing of stats. This is optional and can be removed.
We do not give implementation code, this is your own doing.
### PASTE_CHECK_URL

View file

@ -26,7 +26,7 @@ sourceCompatibility = '1.8'
targetCompatibility = '1.8'
group = 'com.atlauncher'
version = '3.3.4.5'
version = '3.3.4.6'
repositories {
mavenCentral()

View file

@ -18,7 +18,7 @@
package com.atlauncher.data;
public class Constants {
public static final LauncherVersion VERSION = new LauncherVersion(3, 3, 4, 5);
public static final LauncherVersion VERSION = new LauncherVersion(3, 3, 4, 6);
public static final String LAUNCHER_NAME = "ATLauncher";
public static final String DISCORD_CLIENT_ID = "589393213723246592";
public static final String GA_TRACKING_ID = "UA-88820616-7";

View file

@ -543,17 +543,6 @@ public class Instance implements Cloneable {
return this.usesNewLibraries;
}
/**
* Checks to see if Leaderboards are enabled for the Pack this Instance was
* created from. If the pack no longer exists we don't allow logging of
* Leaderboard statistics.
*
* @return true if Leaderboard are enabled and statistics can be sent
*/
public boolean isLeaderboardsEnabled() {
return (this.realPack != null && this.realPack.isLeaderboardsEnabled());
}
/**
* Checks to see if Logging is enabled for the Pack this Instance was created
* from. If the pack no longer exists we don't allow logging.
@ -1507,7 +1496,7 @@ public class Instance implements Cloneable {
}
App.settings.setMinecraftLaunched(false);
if (isLeaderboardsEnabled() && isLoggingEnabled() && !isDev() && App.settings.enableLogs()) {
if (isLoggingEnabled() && !isDev() && App.settings.enableLogs()) {
final int timePlayed = (int) (end - start) / 1000;
if (timePlayed > 0) {
App.TASKPOOL.submit(() -> {
@ -1573,11 +1562,6 @@ public class Instance implements Cloneable {
public String addTimePlayed(int time, String version) {
Map<String, Object> request = new HashMap<>();
if (App.settings.enableLeaderboards()) {
request.put("username", App.settings.getAccount().getMinecraftUsername());
} else {
request.put("username", null);
}
request.put("version", version);
request.put("time", time);

View file

@ -537,8 +537,8 @@ public class InstanceV2 extends MinecraftVersion {
}
App.settings.setMinecraftLaunched(false);
if (this.getPack() != null && this.getPack().isLeaderboardsEnabled()
&& this.getPack().isLoggingEnabled() && !this.launcher.isDev && App.settings.enableLogs()) {
if (this.getPack() != null && this.getPack().isLoggingEnabled() && !this.launcher.isDev
&& App.settings.enableLogs()) {
final int timePlayed = (int) (end - start) / 1000;
if (timePlayed > 0) {
App.TASKPOOL.submit(() -> {
@ -604,11 +604,6 @@ public class InstanceV2 extends MinecraftVersion {
public String addTimePlayed(int time, String version) {
Map<String, Object> request = new HashMap<>();
if (App.settings.enableLeaderboards()) {
request.put("username", App.settings.getAccount().getMinecraftUsername());
} else {
request.put("username", null);
}
request.put("version", version);
request.put("time", time);

View file

@ -43,7 +43,6 @@ public class Pack {
public List<PackVersion> versions;
public List<PackVersion> devVersions;
public boolean createServer;
public boolean leaderboards;
public boolean logging;
public boolean featured;
public boolean hasDiscordImage;
@ -130,10 +129,6 @@ public class Pack {
return this.logging;
}
public boolean isLeaderboardsEnabled() {
return this.leaderboards;
}
public boolean isFeatured() {
return this.featured;
}
@ -301,7 +296,6 @@ public class Pack {
public String addInstall(String version) {
Map<String, Object> request = new HashMap<>();
request.put("username", App.settings.getAccount().getMinecraftUsername());
request.put("version", version);
try {
@ -315,7 +309,6 @@ public class Pack {
public String addServerInstall(String version) {
Map<String, Object> request = new HashMap<>();
request.put("username", App.settings.getAccount().getMinecraftUsername());
request.put("version", version);
try {
@ -329,7 +322,6 @@ public class Pack {
public String addUpdate(String version) {
Map<String, Object> request = new HashMap<>();
request.put("username", App.settings.getAccount().getMinecraftUsername());
request.put("version", version);
try {

View file

@ -117,7 +117,6 @@ public class Settings {
private boolean enableTrayIcon; // If to enable tray icon
private boolean enableDiscordIntegration; // If to enable Discord integration
private boolean enableFeralGamemode; // If to enable Feral Gamemode
private boolean enableLeaderboards; // If to enable the leaderboards
private boolean enableLogs; // If to enable logs
private boolean enableAnalytics; // If to enable analytics
private boolean enableOpenEyeReporting; // If to enable OpenEye reporting
@ -828,8 +827,6 @@ public class Settings {
this.enableFeralGamemode = Boolean.parseBoolean(properties.getProperty("enableferalgamemode", "true"));
this.enableLeaderboards = Boolean.parseBoolean(properties.getProperty("enableleaderboards", "false"));
this.enableLogs = Boolean.parseBoolean(properties.getProperty("enablelogs", "true"));
this.enableAnalytics = Boolean.parseBoolean(properties.getProperty("enableanalytics", "true"));
@ -945,7 +942,6 @@ public class Settings {
properties.setProperty("enabletrayicon", (this.enableTrayIcon) ? "true" : "false");
properties.setProperty("enablediscordintegration", (this.enableDiscordIntegration) ? "true" : "false");
properties.setProperty("enableferalgamemode", (this.enableFeralGamemode) ? "true" : "false");
properties.setProperty("enableleaderboards", (this.enableLeaderboards) ? "true" : "false");
properties.setProperty("enablelogs", (this.enableLogs) ? "true" : "false");
properties.setProperty("enableanalytics", (this.enableAnalytics) ? "true" : "false");
properties.setProperty("enablepacktags", (this.enablePackTags) ? "true" : "false");
@ -2228,14 +2224,6 @@ public class Settings {
this.enableFeralGamemode = enableFeralGamemode;
}
public boolean enableLeaderboards() {
return this.enableLeaderboards;
}
public void setEnableLeaderboards(boolean enableLeaderboards) {
this.enableLeaderboards = enableLeaderboards;
}
public boolean enableLogs() {
return this.enableLogs;
}

View file

@ -55,9 +55,6 @@ public class SetupDialog extends JDialog implements RelocalizationListener {
private JLabel languageLabel;
private JComboBox<String> language;
private JLabel enableLeaderboardsLabel;
private JCheckBox enableLeaderboards;
private JLabel enableAnalyticsLabel;
private JCheckBox enableAnalytics;
@ -103,18 +100,6 @@ public class SetupDialog extends JDialog implements RelocalizationListener {
});
middle.add(language, gbc);
gbc.gridx = 0;
gbc.gridy++;
gbc.anchor = GridBagConstraints.BASELINE_TRAILING;
enableLeaderboardsLabel = new JLabel(GetText.tr("Enable Leaderboards") + "? ");
middle.add(enableLeaderboardsLabel, gbc);
gbc.gridx++;
gbc.anchor = GridBagConstraints.BASELINE_LEADING;
enableLeaderboards = new JCheckBox();
enableLeaderboards.setSelected(true);
middle.add(enableLeaderboards, gbc);
gbc.gridx = 0;
gbc.gridy++;
gbc.anchor = GridBagConstraints.BASELINE_TRAILING;
@ -137,7 +122,6 @@ public class SetupDialog extends JDialog implements RelocalizationListener {
saveButton = new JButton(GetText.tr("Save"));
saveButton.addActionListener(e -> {
Language.setLanguage((String) language.getSelectedItem());
App.settings.setEnableLeaderboards(enableLeaderboards.isSelected());
App.settings.setEnableAnalytics(enableAnalytics.isSelected());
App.settings.saveProperties();
setVisible(false);
@ -164,7 +148,6 @@ public class SetupDialog extends JDialog implements RelocalizationListener {
public void onRelocalization() {
setupLabel.setText(GetText.tr("Setting up {0}", Constants.LAUNCHER_NAME));
languageLabel.setText(GetText.tr("Language") + ": ");
enableLeaderboardsLabel.setText(GetText.tr("Enable Leaderboards") + "? ");
enableAnalyticsLabel.setText(GetText.tr("Enable Anonymous Analytics") + "? ");
enableAnalyticsLabel.setToolTipText("<html>" + Utils.splitMultilinedString(GetText.tr(
"The Launcher sends back anonymous analytics to Google Analytics in order to track what people do and don't use in the launcher. This helps determine what new features we implement in the future. All analytics are anonymous and contain no user/instance information in it at all. If you don't want to send anonymous analytics, you can disable this option."),

View file

@ -33,9 +33,6 @@ public class LoggingSettingsTab extends AbstractSettingsTab {
private JLabelWithHover forgeLoggingLevelLabel;
private JComboBox<String> forgeLoggingLevel;
private JLabelWithHover enableLeaderboardsLabel;
private JCheckBox enableLeaderboards;
private JLabelWithHover enableLoggingLabel;
private JCheckBox enableLogs;
@ -69,28 +66,6 @@ public class LoggingSettingsTab extends AbstractSettingsTab {
forgeLoggingLevel.setSelectedItem(App.settings.getForgeLoggingLevel());
add(forgeLoggingLevel, gbc);
// Enable Leaderboards
gbc.gridx = 0;
gbc.gridy++;
gbc.insets = LABEL_INSETS;
gbc.anchor = GridBagConstraints.BASELINE_TRAILING;
enableLeaderboardsLabel = new JLabelWithHover(GetText.tr("Enable Leaderboards") + "?", HELP_ICON,
GetText.tr("If you want to participate in the Leaderboards."));
add(enableLeaderboardsLabel, gbc);
gbc.gridx++;
gbc.insets = FIELD_INSETS;
gbc.anchor = GridBagConstraints.BASELINE_LEADING;
enableLeaderboards = new JCheckBox();
if (App.settings.enableLeaderboards()) {
enableLeaderboards.setSelected(true);
}
if (!App.settings.enableLogs()) {
enableLeaderboards.setEnabled(false);
}
add(enableLeaderboards, gbc);
// Enable Logging
gbc.gridx = 0;
@ -110,13 +85,9 @@ public class LoggingSettingsTab extends AbstractSettingsTab {
if (!enableLogs.isSelected()) {
enableOpenEyeReporting.setSelected(false);
enableOpenEyeReporting.setEnabled(false);
enableLeaderboards.setSelected(false);
enableLeaderboards.setEnabled(false);
} else {
enableOpenEyeReporting.setSelected(true);
enableOpenEyeReporting.setEnabled(true);
enableLeaderboards.setSelected(true);
enableLeaderboards.setEnabled(true);
}
});
if (App.settings.enableLogs()) {
@ -172,7 +143,6 @@ public class LoggingSettingsTab extends AbstractSettingsTab {
public void save() {
App.settings.setForgeLoggingLevel((String) forgeLoggingLevel.getSelectedItem());
App.settings.setEnableLeaderboards(enableLeaderboards.isSelected());
App.settings.setEnableLogs(enableLogs.isSelected());
App.settings.setEnableAnalytics(enableAnalytics.isSelected());
App.settings.setEnableOpenEyeReporting(enableOpenEyeReporting.isSelected());