From 00301b26e6b9bd8aa506a8cd7d235952fef6ddbf Mon Sep 17 00:00:00 2001 From: Ali Moghnieh Date: Sat, 6 Aug 2016 17:53:24 +0100 Subject: [PATCH] Add debug for command cooldowns. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index b3b2c60c1..af488f3d2 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -451,6 +451,9 @@ public class EssentialsPlayerListener implements Listener { Entry cooldownEntry = ess.getSettings().getCommandCooldownEntry(fullCommand); if (cooldownEntry != null) { + if (ess.getSettings().isDebug()) { + ess.getLogger().info("Applying " + cooldownEntry.getValue() + "ms cooldown on /" + fullCommand + " for" + user.getName() + "."); + } Date expiry = new Date(System.currentTimeMillis() + cooldownEntry.getValue()); user.addCommandCooldown(cooldownEntry.getKey(), expiry, ess.getSettings().isCommandCooldownPersistent(fullCommand)); }