mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-30 00:27:26 +02:00
Add debug for command cooldowns.
This commit is contained in:
parent
611429b6f6
commit
00301b26e6
@ -451,6 +451,9 @@ public class EssentialsPlayerListener implements Listener {
|
|||||||
Entry<Pattern, Long> cooldownEntry = ess.getSettings().getCommandCooldownEntry(fullCommand);
|
Entry<Pattern, Long> cooldownEntry = ess.getSettings().getCommandCooldownEntry(fullCommand);
|
||||||
|
|
||||||
if (cooldownEntry != null) {
|
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());
|
Date expiry = new Date(System.currentTimeMillis() + cooldownEntry.getValue());
|
||||||
user.addCommandCooldown(cooldownEntry.getKey(), expiry, ess.getSettings().isCommandCooldownPersistent(fullCommand));
|
user.addCommandCooldown(cooldownEntry.getKey(), expiry, ess.getSettings().isCommandCooldownPersistent(fullCommand));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user