mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-27 01:02:24 +01:00
Fix email recovery
This commit is contained in:
parent
30e9610053
commit
b5dcc64ce8
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user