Various minor changes

- AsynchronousLogin: call common permission methods through CommonService instead of PermissionsManager
- CommandManager: remove superfluous replacement of %p (handled by lazy tag replacer)
- Remove unused method in CommonService
- Create DebugSectionConsistencyTest
- SendMailSSL: Enable debug output if AuthMe log level is set to debug
- Add Utils#logAndSendMessage and replace existing, separate implementations
This commit is contained in:
ljacqu
2017-03-12 14:04:39 +01:00
parent 72acf28233
commit 10d8f00c92
13 changed files with 148 additions and 65 deletions
@@ -9,14 +9,13 @@ import fr.xephi.authme.settings.properties.PurgeSettings;
import fr.xephi.authme.util.Utils;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import javax.inject.Inject;
import java.util.Calendar;
import java.util.Collection;
import java.util.Set;
// TODO: move into services. -sgdc3
import static fr.xephi.authme.util.Utils.logAndSendMessage;
/**
* Initiates purge tasks.
@@ -119,12 +118,4 @@ public class PurgeService {
void executePurge(Collection<OfflinePlayer> players, Collection<String> names) {
purgeExecutor.executePurge(players, names);
}
private static void logAndSendMessage(CommandSender sender, String message) {
ConsoleLogger.info(message);
// Make sure sender is not console user, which will see the message from ConsoleLogger already
if (sender != null && !(sender instanceof ConsoleCommandSender)) {
sender.sendMessage(message);
}
}
}