Minor - make AuthMe.database private
- In favor of AuthMe.getDataSource()
This commit is contained in:
+2
-5
@@ -7,7 +7,6 @@ import fr.xephi.authme.command.CommandService;
|
||||
import fr.xephi.authme.command.ExecutableCommand;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.output.MessageKey;
|
||||
import fr.xephi.authme.security.PasswordSecurity;
|
||||
import fr.xephi.authme.security.crypts.HashResult;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -72,10 +71,8 @@ public class ChangePasswordAdminCommand implements ExecutableCommand {
|
||||
HashResult hashResult = commandService.getPasswordSecurity().computeHash(playerPass, playerNameLowerCase);
|
||||
auth.setHash(hashResult.getHash());
|
||||
auth.setSalt(hashResult.getSalt());
|
||||
if (PasswordSecurity.userSalt.containsKey(playerNameLowerCase)) {
|
||||
auth.setSalt(PasswordSecurity.userSalt.get(playerNameLowerCase));
|
||||
commandService.getDataSource().updateSalt(auth);
|
||||
}
|
||||
|
||||
// TODO #358: updatePassword(auth) needs to update the salt, too.
|
||||
if (!dataSource.updatePassword(auth)) {
|
||||
commandService.send(sender, MessageKey.ERROR);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class PurgeBannedPlayersCommand implements ExecutableCommand {
|
||||
}
|
||||
|
||||
// Purge the banned players
|
||||
plugin.database.purgeBanned(bannedPlayers);
|
||||
plugin.getDataSource().purgeBanned(bannedPlayers);
|
||||
if (Settings.purgeEssentialsFile && plugin.ess != null)
|
||||
plugin.dataManager.purgeEssentials(bannedPlayers);
|
||||
if (Settings.purgePlayerDat)
|
||||
|
||||
Reference in New Issue
Block a user