Add bypass perm for gc

This commit is contained in:
destro174
2021-07-27 20:06:36 +02:00
parent 0891e252f9
commit ec9b474f72
3 changed files with 9 additions and 1 deletions
@@ -65,7 +65,7 @@ public class ChatHandler {
return;
}
long timeLeft = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - user.getGcCooldown());
if(timeLeft <= Config.GCCOOLDOWN) { // player is on cooldown and should wait x seconds
if(timeLeft <= Config.GCCOOLDOWN || player.hasPermission("chat.globalchat.cooldownbypass")) { // player is on cooldown and should wait x seconds
player.sendMessage(miniMessage.parse(Config.GCONCOOLDOWN, Template.of("cooldown", Config.GCCOOLDOWN-timeLeft+"")));
return;
}