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 java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -172,21 +171,8 @@ public class EmailCommand implements CommandExecutor {
|
|||||||
m.send(player, "email_invalid");
|
m.send(player, "email_invalid");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final String finalhashnew = hashnew;
|
auth.setHash(hashnew);
|
||||||
final PlayerAuth finalauth = auth;
|
data.updatePassword(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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
plugin.mail.main(auth, thePass);
|
plugin.mail.main(auth, thePass);
|
||||||
m.send(player, "email_send");
|
m.send(player, "email_send");
|
||||||
} catch (NoSuchAlgorithmException ex) {
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
|||||||
@ -53,7 +53,6 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
public static GameMode gm = GameMode.SURVIVAL;
|
public static GameMode gm = GameMode.SURVIVAL;
|
||||||
public static ConcurrentHashMap<String, GameMode> gameMode = new ConcurrentHashMap<String, GameMode>();
|
public static ConcurrentHashMap<String, GameMode> gameMode = new ConcurrentHashMap<String, GameMode>();
|
||||||
public static ConcurrentHashMap<String, String> joinMessage = new ConcurrentHashMap<String, String>();
|
public static ConcurrentHashMap<String, String> joinMessage = new ConcurrentHashMap<String, String>();
|
||||||
private Utils utils = Utils.getInstance();
|
|
||||||
private Messages m = Messages.getInstance();
|
private Messages m = Messages.getInstance();
|
||||||
public AuthMe plugin;
|
public AuthMe plugin;
|
||||||
private DataSource data;
|
private DataSource data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user