Fix PlayerAuth constructor calls

This commit is contained in:
games647
2015-10-03 18:22:13 +02:00
parent 4c2348e6e3
commit e9f299fca8
16 changed files with 1115 additions and 1128 deletions
@@ -260,7 +260,7 @@ public class AdminCommand implements CommandExecutor {
return;
}
String hash = PasswordSecurity.getHash(Settings.getPasswordHash, lowpass, name);
PlayerAuth auth = new PlayerAuth(name, hash, "192.168.0.1", 0L, "your@email.com");
PlayerAuth auth = new PlayerAuth(name, hash, "192.168.0.1", 0L, "your@email.com", name);
if (PasswordSecurity.userSalt.containsKey(name) && PasswordSecurity.userSalt.get(name) != null)
auth.setSalt(PasswordSecurity.userSalt.get(name));
else auth.setSalt("");
@@ -173,12 +173,9 @@ public class EmailCommand implements CommandExecutor {
plugin.database.updatePassword(auth);
plugin.mail.main(auth, thePass);
m.send(player, "email_send");
} catch (NoSuchAlgorithmException ex) {
} catch (NoSuchAlgorithmException | NoClassDefFoundError ex) {
ConsoleLogger.showError(ex.getMessage());
m.send(sender, "error");
} catch (NoClassDefFoundError ncdfe) {
ConsoleLogger.showError(ncdfe.getMessage());
m.send(sender, "error");
}
} else {
m.send(player, "reg_email_msg");