Minor - make AuthMe.database private

- In favor of AuthMe.getDataSource()
This commit is contained in:
ljacqu
2015-12-29 11:55:57 +01:00
parent 571cb6d36b
commit 531327dd9b
17 changed files with 98 additions and 158 deletions
@@ -40,7 +40,7 @@ public class AsyncChangeEmail {
if (Settings.getmaxRegPerEmail > 0) {
if (!plugin.getPermissionsManager().hasPermission(player, PlayerPermission.ALLOW_MULTIPLE_ACCOUNTS)
&& plugin.database.getAllAuthsByEmail(newEmail).size() >= Settings.getmaxRegPerEmail) {
&& plugin.getDataSource().getAllAuthsByEmail(newEmail).size() >= Settings.getmaxRegPerEmail) {
m.send(player, MessageKey.MAX_REGISTER_EXCEEDED);
return;
}
@@ -68,7 +68,7 @@ public class AsyncChangeEmail {
}
String old = auth.getEmail();
auth.setEmail(newEmail);
if (!plugin.database.updateEmail(auth)) {
if (!plugin.getDataSource().updateEmail(auth)) {
m.send(player, MessageKey.ERROR);
auth.setEmail(old);
return;
@@ -81,7 +81,7 @@ public class AsyncChangeEmail {
}
m.send(player, MessageKey.EMAIL_CHANGED_SUCCESS);
} else {
if (plugin.database.isAuthAvailable(playerName)) {
if (plugin.getDataSource().isAuthAvailable(playerName)) {
m.send(player, MessageKey.LOGIN_MESSAGE);
} else {
if (Settings.emailRegistration) {