changed gravity gauntlet to remove cooldown all together in creativemode

This commit is contained in:
kai ohara 2025-02-07 17:12:03 -05:00
parent 7f3f150e96
commit 00e502a746
11 changed files with 7 additions and 5 deletions

View File

@ -37,11 +37,13 @@ public class GravityGauntlet implements Listener {
event.setCancelled(true);
// Cooldown check
if (cooldowns.containsKey(player.getUniqueId())) {
long timeLeft = (cooldowns.get(player.getUniqueId()) + COOLDOWN_TIME) - System.currentTimeMillis();
if (timeLeft > 0) {
player.sendMessage(ColorKey("&cThe Gravity Gauntlet is on cooldown for " + (timeLeft / 1000) + "s!"));
return;
if(player.getGameMode() != GameMode.CREATIVE) {
if (cooldowns.containsKey(player.getUniqueId())) {
long timeLeft = (cooldowns.get(player.getUniqueId()) + COOLDOWN_TIME) - System.currentTimeMillis();
if (timeLeft > 0) {
player.sendMessage(ColorKey("&cThe Gravity Gauntlet is on cooldown for " + (timeLeft / 1000) + "s!"));
return;
}
}
}
cooldowns.put(player.getUniqueId(), System.currentTimeMillis());