diff --git a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java index 9906d149..d4bed21c 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java @@ -29,7 +29,6 @@ import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; import java.sql.Timestamp; import java.util.*; -import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.logging.Level; import java.util.stream.Collectors; @@ -359,7 +358,7 @@ public class SteamwarUser { } public boolean hasPassword() { - return this.password == null; + return this.password != null; } private byte[] generateHash(String password, byte[] salt) diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java index 3ab97ddf..d19dedd0 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/WebpasswordCommand.java @@ -23,8 +23,6 @@ import de.steamwar.command.SWCommand; import de.steamwar.messages.Chatter; import de.steamwar.sql.SteamwarUser; -import java.io.IOException; - public class WebpasswordCommand extends SWCommand { public WebpasswordCommand() { @@ -44,10 +42,6 @@ public class WebpasswordCommand extends SWCommand { user.setPassword(password); - if (resetPW) { - sender.system("WEB_UPDATED"); - } else { - sender.system("WEB_CREATED"); - } + sender.system(resetPW ? "WEB_UPDATED" : "WEB_CREATED"); } }