mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-23 05:53:54 +00:00
Add more debug logging to Settings (#2140)
Adds debug logging for `getChatFormat` and `getCommandCooldownEntry`, which makes it much easier to track down issues with group formats in EssentialsX Chat and command cooldowns respectively.
This commit is contained in:
parent
935b5cfe0f
commit
c79db98978
1 changed files with 9 additions and 1 deletions
|
@ -432,6 +432,9 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
mFormat = "§r".concat(mFormat);
|
||||
chatFormats.put(group, mFormat);
|
||||
}
|
||||
if (isDebug()) {
|
||||
ess.getLogger().info(String.format("Found format '%s' for group '%s'", mFormat, group));
|
||||
}
|
||||
return mFormat;
|
||||
}
|
||||
|
||||
|
@ -1293,7 +1296,12 @@ public class Settings implements net.ess3.api.ISettings {
|
|||
if (isCommandCooldownsEnabled()) {
|
||||
for (Entry<Pattern, Long> entry : this.commandCooldowns.entrySet()) {
|
||||
// Check if label matches current pattern (command-cooldown in config)
|
||||
if (entry.getKey().matcher(label).matches()) {
|
||||
boolean matches = entry.getKey().matcher(label).matches();
|
||||
if (isDebug()) {
|
||||
ess.getLogger().info(String.format("Checking command '%s' against cooldown '%s': %s", label, entry.getKey(), matches));
|
||||
}
|
||||
|
||||
if (matches) {
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue