diff --git a/src/main/java/net/minestom/server/utils/time/CooldownUtils.java b/src/main/java/net/minestom/server/utils/time/CooldownUtils.java index 601c4458e..8d9fc90fa 100644 --- a/src/main/java/net/minestom/server/utils/time/CooldownUtils.java +++ b/src/main/java/net/minestom/server/utils/time/CooldownUtils.java @@ -17,7 +17,7 @@ public final class CooldownUtils { * @param cooldown the value of the cooldown * @return true if the cooldown is in progress, false otherwise */ - public static boolean hasCooldown(long currentTime, long lastUpdate, @NotNull TimeUnit timeUnit, int cooldown) { + public static boolean hasCooldown(long currentTime, long lastUpdate, @NotNull TimeUnit timeUnit, long cooldown) { final long cooldownMs = timeUnit.toMilliseconds(cooldown); return currentTime - lastUpdate < cooldownMs; } diff --git a/src/main/java/net/minestom/server/utils/time/UpdateOption.java b/src/main/java/net/minestom/server/utils/time/UpdateOption.java index c86315bab..37ccd6361 100644 --- a/src/main/java/net/minestom/server/utils/time/UpdateOption.java +++ b/src/main/java/net/minestom/server/utils/time/UpdateOption.java @@ -1,19 +1,22 @@ package net.minestom.server.utils.time; +import org.jetbrains.annotations.NotNull; + public class UpdateOption { - private final int value; + private final long value; private final TimeUnit timeUnit; - public UpdateOption(int value, TimeUnit timeUnit) { + public UpdateOption(long value, @NotNull TimeUnit timeUnit) { this.value = value; this.timeUnit = timeUnit; } - public int getValue() { + public long getValue() { return value; } + @NotNull public TimeUnit getTimeUnit() { return timeUnit; }