changed gravity gauntlet to remove cooldown all together in creativemode
This commit is contained in:
parent
7f3f150e96
commit
00e502a746
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -37,11 +37,13 @@ public class GravityGauntlet implements Listener {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
// Cooldown check
|
// Cooldown check
|
||||||
if (cooldowns.containsKey(player.getUniqueId())) {
|
if(player.getGameMode() != GameMode.CREATIVE) {
|
||||||
long timeLeft = (cooldowns.get(player.getUniqueId()) + COOLDOWN_TIME) - System.currentTimeMillis();
|
if (cooldowns.containsKey(player.getUniqueId())) {
|
||||||
if (timeLeft > 0) {
|
long timeLeft = (cooldowns.get(player.getUniqueId()) + COOLDOWN_TIME) - System.currentTimeMillis();
|
||||||
player.sendMessage(ColorKey("&cThe Gravity Gauntlet is on cooldown for " + (timeLeft / 1000) + "s!"));
|
if (timeLeft > 0) {
|
||||||
return;
|
player.sendMessage(ColorKey("&cThe Gravity Gauntlet is on cooldown for " + (timeLeft / 1000) + "s!"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cooldowns.put(player.getUniqueId(), System.currentTimeMillis());
|
cooldowns.put(player.getUniqueId(), System.currentTimeMillis());
|
||||||
|
Loading…
Reference in New Issue
Block a user