refactor all class to use the message key for sending messages.

This commit is contained in:
DNx5
2015-11-26 10:18:53 +07:00
parent 2de0e0e819
commit 7a78b321e7
31 changed files with 197 additions and 133 deletions
@@ -4,6 +4,7 @@ import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.limbo.LimboCache;
import fr.xephi.authme.cache.limbo.LimboPlayer;
import fr.xephi.authme.settings.MessageKey;
import fr.xephi.authme.settings.Messages;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.task.MessageTask;
@@ -46,7 +47,7 @@ public class ProcessSyncEmailRegister implements Runnable {
if (!Settings.getRegisteredGroup.isEmpty()) {
Utils.setGroup(player, Utils.GroupType.REGISTERED);
}
m.send(player, "vb_nonActiv");
m.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
int time = Settings.getRegistrationTimeout * 20;
int msgInterval = Settings.getWarnMessageInterval;
@@ -58,7 +59,7 @@ public class ProcessSyncEmailRegister implements Runnable {
}
if (limbo != null) {
limbo.getMessageTaskId().cancel();
BukkitTask nwMsg = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("login_msg"), msgInterval));
BukkitTask nwMsg = sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.retrieve(MessageKey.LOGIN_MESSAGE), msgInterval));
limbo.setMessageTaskId(nwMsg);
}