mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-18 08:15:12 +01:00
Minor - remove messages language from old settings
This commit is contained in:
parent
3e30a34714
commit
ab719c4204
@ -178,15 +178,6 @@ public class AuthMe extends JavaPlugin {
|
|||||||
return pluginBuildNumber;
|
return pluginBuildNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the plugin's Settings.
|
|
||||||
*
|
|
||||||
* @return Plugin's settings.
|
|
||||||
*/
|
|
||||||
public Settings getSettings() {
|
|
||||||
return settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Messages instance.
|
* Get the Messages instance.
|
||||||
*
|
*
|
||||||
@ -478,12 +469,13 @@ public class AuthMe extends JavaPlugin {
|
|||||||
private void setupMetrics() {
|
private void setupMetrics() {
|
||||||
try {
|
try {
|
||||||
Metrics metrics = new Metrics(this);
|
Metrics metrics = new Metrics(this);
|
||||||
Graph messagesLanguage = metrics.createGraph("Messages language");
|
Graph languageGraph = metrics.createGraph("Messages language");
|
||||||
Graph databaseBackend = metrics.createGraph("Database backend");
|
Graph backendGraph = metrics.createGraph("Database backend");
|
||||||
|
|
||||||
// Custom graphs
|
// Custom graphs
|
||||||
if (newSettings.getMessagesFile().exists()) {
|
if (newSettings.getMessagesFile().exists()) {
|
||||||
messagesLanguage.addPlotter(new Metrics.Plotter(Settings.messagesLanguage) {
|
String messagesLanguage = newSettings.getProperty(PluginSettings.MESSAGES_LANGUAGE);
|
||||||
|
languageGraph.addPlotter(new Metrics.Plotter(messagesLanguage) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getValue() {
|
public int getValue() {
|
||||||
@ -491,7 +483,9 @@ public class AuthMe extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
databaseBackend.addPlotter(new Metrics.Plotter(Settings.getDataSource.toString()) {
|
|
||||||
|
DataSource.DataSourceType dataSource = newSettings.getProperty(DatabaseSettings.BACKEND);
|
||||||
|
backendGraph.addPlotter(new Metrics.Plotter(dataSource.toString()) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getValue() {
|
public int getValue() {
|
||||||
@ -503,8 +497,9 @@ public class AuthMe extends JavaPlugin {
|
|||||||
ConsoleLogger.info("Metrics started successfully!");
|
ConsoleLogger.info("Metrics started successfully!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Failed to submit the metrics data
|
// Failed to submit the metrics data
|
||||||
|
ConsoleLogger.showError("Can't start Metrics! The plugin will work anyway... (Encountered "
|
||||||
|
+ StringUtils.formatException(e) + ")");
|
||||||
ConsoleLogger.writeStackTrace(e);
|
ConsoleLogger.writeStackTrace(e);
|
||||||
ConsoleLogger.showError("Can't start Metrics! The plugin will work anyway...");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -884,18 +879,18 @@ public class AuthMe extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String replaceAllInfo(String message, Player player) {
|
public String replaceAllInfo(String message, Player player) {
|
||||||
int playersOnline = Utils.getOnlinePlayers().size();
|
String playersOnline = Integer.toString(Utils.getOnlinePlayers().size());
|
||||||
message = message.replace("&", "\u00a7");
|
return message
|
||||||
message = message.replace("{PLAYER}", player.getName());
|
.replace("&", "\u00a7")
|
||||||
message = message.replace("{ONLINE}", "" + playersOnline);
|
.replace("{PLAYER}", player.getName())
|
||||||
message = message.replace("{MAXPLAYERS}", "" + server.getMaxPlayers());
|
.replace("{ONLINE}", playersOnline)
|
||||||
message = message.replace("{IP}", getIP(player));
|
.replace("{MAXPLAYERS}", Integer.toString(server.getMaxPlayers()))
|
||||||
message = message.replace("{LOGINS}", "" + PlayerCache.getInstance().getLogged());
|
.replace("{IP}", getIP(player))
|
||||||
message = message.replace("{WORLD}", player.getWorld().getName());
|
.replace("{LOGINS}", Integer.toString(PlayerCache.getInstance().getLogged()))
|
||||||
message = message.replace("{SERVER}", server.getServerName());
|
.replace("{WORLD}", player.getWorld().getName())
|
||||||
message = message.replace("{VERSION}", server.getBukkitVersion());
|
.replace("{SERVER}", server.getServerName())
|
||||||
message = message.replace("{COUNTRY}", GeoLiteAPI.getCountryName(getIP(player)));
|
.replace("{VERSION}", server.getBukkitVersion())
|
||||||
return message;
|
.replace("{COUNTRY}", GeoLiteAPI.getCountryName(getIP(player)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,11 +8,7 @@ import fr.xephi.authme.security.HashAlgorithm;
|
|||||||
import fr.xephi.authme.util.Wrapper;
|
import fr.xephi.authme.util.Wrapper;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -77,7 +73,7 @@ public final class Settings {
|
|||||||
getMySQLColumnIp, getMySQLColumnLastLogin, getMySQLColumnSalt,
|
getMySQLColumnIp, getMySQLColumnLastLogin, getMySQLColumnSalt,
|
||||||
getMySQLColumnGroup, getMySQLColumnEmail, unRegisteredGroup,
|
getMySQLColumnGroup, getMySQLColumnEmail, unRegisteredGroup,
|
||||||
backupWindowsPath, getRegisteredGroup,
|
backupWindowsPath, getRegisteredGroup,
|
||||||
messagesLanguage, getMySQLlastlocX, getMySQLlastlocY,
|
getMySQLlastlocX, getMySQLlastlocY,
|
||||||
getMySQLlastlocZ, rakamakUsers, rakamakUsersIp, getmailAccount,
|
getMySQLlastlocZ, rakamakUsers, rakamakUsersIp, getmailAccount,
|
||||||
getMySQLColumnId, getMySQLlastlocWorld, defaultWorld,
|
getMySQLColumnId, getMySQLlastlocWorld, defaultWorld,
|
||||||
getPhpbbPrefix, getWordPressPrefix, getMySQLColumnLogged,
|
getPhpbbPrefix, getWordPressPrefix, getMySQLColumnLogged,
|
||||||
@ -125,7 +121,6 @@ public final class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void loadVariables() {
|
public static void loadVariables() {
|
||||||
messagesLanguage = checkLang(configFile.getString("settings.messagesLanguage", "en").toLowerCase());
|
|
||||||
isPermissionCheckEnabled = configFile.getBoolean("permission.EnablePermissionCheck", false);
|
isPermissionCheckEnabled = configFile.getBoolean("permission.EnablePermissionCheck", false);
|
||||||
isForcedRegistrationEnabled = configFile.getBoolean("settings.registration.force", true);
|
isForcedRegistrationEnabled = configFile.getBoolean("settings.registration.force", true);
|
||||||
isRegistrationEnabled = configFile.getBoolean("settings.registration.enabled", true);
|
isRegistrationEnabled = configFile.getBoolean("settings.registration.enabled", true);
|
||||||
|
Loading…
Reference in New Issue
Block a user