Encapsulate fields in main class; see #762 #655 #604

This commit is contained in:
Gnat008
2016-06-27 11:25:12 -04:00
parent 99704e7c29
commit 0c96a3113b
10 changed files with 84 additions and 37 deletions
@@ -41,7 +41,7 @@ public class RecoverEmailCommand extends PlayerCommand {
final String playerMail = arguments.get(0);
final String playerName = player.getName();
if (plugin.mail == null) {
if (plugin.getMail() == null) {
ConsoleLogger.showError("Mail API is not set");
commandService.send(player, MessageKey.ERROR);
return;
@@ -76,7 +76,7 @@ public class RecoverEmailCommand extends PlayerCommand {
}
auth.setPassword(hashNew);
dataSource.updatePassword(auth);
plugin.mail.main(auth, thePass);
plugin.getMail().main(auth, thePass);
commandService.send(player, MessageKey.RECOVERY_EMAIL_SENT_MESSAGE);
} else {
commandService.send(player, MessageKey.REGISTER_EMAIL_MESSAGE);