diff --git a/src/main/java/me/angeschossen/lands/api/player/PlayerCooldown.java b/src/main/java/me/angeschossen/lands/api/player/PlayerCooldown.java index b4a3129..a5ed4a9 100644 --- a/src/main/java/me/angeschossen/lands/api/player/PlayerCooldown.java +++ b/src/main/java/me/angeschossen/lands/api/player/PlayerCooldown.java @@ -90,11 +90,7 @@ public long getTime() { * @param time if 0, disables this cooldown */ public void setTime(long time) { - if (time < 0) { - throw new IllegalArgumentException("time can't be lower than 0"); - } - - this.time = time; + this.time = Math.max(time, 0); // all lower than 1 disables it } public enum ConfigType {