Fix email recovery

This commit is contained in:
Xephi59 2015-07-08 16:39:54 +02:00
parent 30e9610053
commit b5dcc64ce8
2 changed files with 2 additions and 17 deletions

View File

@ -2,7 +2,6 @@ package fr.xephi.authme.commands;
import java.security.NoSuchAlgorithmException;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
@ -172,21 +171,8 @@ public class EmailCommand implements CommandExecutor {
m.send(player, "email_invalid");
return true;
}
final String finalhashnew = hashnew;
final PlayerAuth finalauth = auth;
if (data instanceof Thread) {
finalauth.setHash(hashnew);
data.updatePassword(auth);
} else {
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
@Override
public void run() {
finalauth.setHash(finalhashnew);
data.updatePassword(finalauth);
}
});
}
auth.setHash(hashnew);
data.updatePassword(auth);
plugin.mail.main(auth, thePass);
m.send(player, "email_send");
} catch (NoSuchAlgorithmException ex) {

View File

@ -53,7 +53,6 @@ public class AuthMePlayerListener implements Listener {
public static GameMode gm = GameMode.SURVIVAL;
public static ConcurrentHashMap<String, GameMode> gameMode = new ConcurrentHashMap<String, GameMode>();
public static ConcurrentHashMap<String, String> joinMessage = new ConcurrentHashMap<String, String>();
private Utils utils = Utils.getInstance();
private Messages m = Messages.getInstance();
public AuthMe plugin;
private DataSource data;