Apostrophes are no longer necessary in config.yml
This commit is contained in:
4 files changed
+10
-12
No files matched your search
@@ -229,8 +229,8 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
|
||||
* @return <b>true</b> if the entry's value is "true", "false", or "linked"
|
||||
*/
|
||||
private boolean isValidFloodgateConfigString(String key) {
|
||||
String value = core.getConfig().getString(key);
|
||||
if (!value.equalsIgnoreCase("true") && !value.equalsIgnoreCase("linked") && !value.equalsIgnoreCase("false")) {
|
||||
String value = core.getConfig().get(key).toString().toLowerCase();
|
||||
if (!value.equals("true") && !value.equals("linked") && !value.equals("false")) {
|
||||
logger.error("Invalid value detected for {} in FastLogin/config.yml.", key);
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class NameCheckTask extends JoinManagement<Player, CommandSender, Protoco
|
||||
public void run() {
|
||||
try {
|
||||
// check if the player is connecting through Geyser
|
||||
if (!plugin.getCore().getConfig().getString("allowFloodgateNameConflict").equalsIgnoreCase("false")
|
||||
if (!plugin.getCore().getConfig().get("allowFloodgateNameConflict").toString().equalsIgnoreCase("false")
|
||||
&& getFloodgatePlayer(username) != null) {
|
||||
plugin.getLog().info("Skipping name conflict checking for player {}", username);
|
||||
return;
|
||||
|
||||
+5
-5
@@ -26,10 +26,10 @@ public class FloodgateAuthTask implements Runnable {
|
||||
plugin.getLog().info(
|
||||
"Player {} is connecting through Geyser Floodgate.",
|
||||
player.getName());
|
||||
String allowNameConflict = plugin.getCore().getConfig().getString("allowFloodgateNameConflict");
|
||||
String allowNameConflict = plugin.getCore().getConfig().get("allowFloodgateNameConflict").toString().toLowerCase();
|
||||
// check if the Bedrock player is linked to a Java account
|
||||
boolean isLinked = floodgatePlayer.getLinkedPlayer() != null;
|
||||
if (allowNameConflict.equalsIgnoreCase("linked") && !isLinked) {
|
||||
if (allowNameConflict.equals("linked") && !isLinked) {
|
||||
plugin.getLog().info(
|
||||
"Bedrock Player {}'s name conflits an existing Java Premium Player's name",
|
||||
player.getName());
|
||||
@@ -47,7 +47,7 @@ public class FloodgateAuthTask implements Runnable {
|
||||
|
||||
AuthPlugin<Player> authPlugin = plugin.getCore().getAuthPluginHook();
|
||||
|
||||
String autoLoginFloodgate = plugin.getCore().getConfig().getString("autoLoginFloodgate");
|
||||
String autoLoginFloodgate = plugin.getCore().getConfig().get("autoLoginFloodgate").toString().toLowerCase();
|
||||
boolean autoRegisterFloodgate = plugin.getCore().getConfig().getBoolean("autoRegisterFloodgate");
|
||||
|
||||
boolean isRegistered;
|
||||
@@ -75,8 +75,8 @@ public class FloodgateAuthTask implements Runnable {
|
||||
BukkitLoginSession session = new BukkitLoginSession(player.getName(), isRegistered, profile);
|
||||
|
||||
// enable auto login based on the value of 'autoLoginFloodgate' in config.yml
|
||||
session.setVerified(autoLoginFloodgate.equalsIgnoreCase("true")
|
||||
|| (autoLoginFloodgate.equalsIgnoreCase("linked") && isLinked));
|
||||
session.setVerified(autoLoginFloodgate.equals("true")
|
||||
|| (autoLoginFloodgate.equals("linked") && isLinked));
|
||||
|
||||
// run login task
|
||||
Runnable forceLoginTask = new ForceLoginTask(plugin.getCore(), player, session);
|
||||
|
||||
Reference in new issue
Block a user