Fix console spam

This commit is contained in:
Teriuihi 2022-02-08 00:31:20 +01:00
parent 683dda7031
commit 15e5efddad

View File

@ -33,11 +33,14 @@ public class AuthTimer<taskID> {
if (player.hasPermission("liteflags.authentication.success")) {
AuthTimer.endTask(player);
} else {
final String code = MapCache.reauthedPlayers.get(uuid);
if (code == null)
return;
player.sendMiniMessage(Config.AUTHENTICATE, List.of(
Template.template("code", MapCache.reauthedPlayers.get(uuid))));
Template.template("code", code)));
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), Config.AUTH_MESSAGE_COMMAND
.replaceAll("<player>", player.getName())
.replaceAll("<code>", MapCache.reauthedPlayers.get(uuid)));
.replaceAll("<code>", code));
this.timeRemaining = Config.AUTH_MESSAGE_REPEAT_TIMER;
}
} else if (player.hasPermission("liteflags.authentication.success")) {