mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Flipped equals statements with string literals
This commit is contained in:
parent
ca52000794
commit
ad61522e89
@ -71,7 +71,7 @@ public class ManageImportCommand extends CommandNode {
|
||||
|
||||
String importArg = args[0];
|
||||
|
||||
if (importArg.equals("list")) {
|
||||
if ("list".equals(importArg)) {
|
||||
sender.sendMessage(locale.getString(ManageLang.IMPORTERS));
|
||||
importSystem.getImporterNames().forEach(name -> sender.sendMessage("- " + name));
|
||||
return;
|
||||
|
@ -131,7 +131,7 @@ public class LocaleSystem implements SubSystem {
|
||||
private Optional<Locale> loadSettingLocale() {
|
||||
try {
|
||||
String setting = config.get(PluginSettings.LOCALE);
|
||||
if (!setting.equalsIgnoreCase("default")) {
|
||||
if (!"default".equalsIgnoreCase(setting)) {
|
||||
return Optional.of(Locale.forLangCodeString(plugin, setting));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -159,7 +159,7 @@ public class WebServer implements SubSystem {
|
||||
private boolean startHttpsServer() {
|
||||
String keyStorePath = config.get(WebserverSettings.CERTIFICATE_PATH);
|
||||
|
||||
if (keyStorePath.equalsIgnoreCase("proxy")) {
|
||||
if ("proxy".equalsIgnoreCase(keyStorePath)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class InspectPagePluginsContent extends PageResponse {
|
||||
|
||||
public static InspectPagePluginsContent generateForThisServer(UUID playerUUID, ServerInfo serverInfo, HookHandler hookHandler) {
|
||||
String serverName = serverInfo.getServer().getName();
|
||||
String actualServerName = serverName.equals("Plan") ? "Server " + serverInfo.getServer().getId() : serverName;
|
||||
String actualServerName = "Plan".equals(serverName) ? "Server " + serverInfo.getServer().getId() : serverName;
|
||||
|
||||
Map<PluginData, InspectContainer> containers = hookHandler.getInspectContainersFor(playerUUID);
|
||||
if (containers.isEmpty()) {
|
||||
|
@ -49,7 +49,7 @@ public abstract class DateFormatter implements Formatter<Long> {
|
||||
protected String format(long epochMs, String format) {
|
||||
boolean useServerTime = config.isTrue(TimeSettings.USE_SERVER_TIME);
|
||||
String localeSetting = config.get(PluginSettings.LOCALE);
|
||||
java.util.Locale usedLocale = localeSetting.equalsIgnoreCase("default")
|
||||
java.util.Locale usedLocale = "default".equalsIgnoreCase(localeSetting)
|
||||
? java.util.Locale.ENGLISH
|
||||
: java.util.Locale.forLanguageTag(localeSetting);
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat(format, usedLocale);
|
||||
|
@ -247,7 +247,7 @@ public class InspectPage implements Page {
|
||||
|
||||
String serverName = serverNames.get(serverUUID);
|
||||
replacer.put("networkName",
|
||||
serverName.equalsIgnoreCase("bungeecord")
|
||||
"bungeecord".equalsIgnoreCase(serverName)
|
||||
? config.get(ProxySettings.NETWORK_NAME)
|
||||
: serverName
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user