This commit is contained in:
Gabriele C
2017-11-02 11:24:17 +01:00
parent 6505538240
commit 273c318e96
22 changed files with 105 additions and 118 deletions
@@ -6,9 +6,10 @@ import fr.xephi.authme.data.auth.PlayerCache;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.process.AsynchronousProcess;
import fr.xephi.authme.service.BungeeService;
import fr.xephi.authme.service.bungeecord.BungeeService;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.service.ValidationService;
import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.util.Utils;
import org.bukkit.entity.Player;
@@ -59,7 +60,7 @@ public class AsyncAddEmail implements AsynchronousProcess {
auth.setEmail(email);
if (dataSource.updateEmail(auth)) {
playerCache.updatePlayer(auth);
bungeeService.sendRefreshEmail(playerName);
bungeeService.sendAuthMeBungeecordMessage(MessageType.REFRESH_EMAIL, playerName);
service.send(player, MessageKey.EMAIL_ADDED_SUCCESS);
} else {
ConsoleLogger.warning("Could not save email for player '" + player + "'");