diff --git a/core/src/main/java/zone/themcgamer/core/cooldown/CooldownHandler.java b/core/src/main/java/zone/themcgamer/core/cooldown/CooldownHandler.java index f66f8e8..9e1b0e5 100644 --- a/core/src/main/java/zone/themcgamer/core/cooldown/CooldownHandler.java +++ b/core/src/main/java/zone/themcgamer/core/cooldown/CooldownHandler.java @@ -63,7 +63,12 @@ public class CooldownHandler extends Module { return true; } + public static Cooldown getCooldown(Player player, String name) { + return getCooldowns(player).stream().filter(cooldown -> cooldown.getName().equals(name)).findFirst().orElse(null); + } + private static List getCooldowns(Player player) { return cooldowns.getOrDefault(player, new ArrayList<>()); } + } \ No newline at end of file