mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 19:07:45 +01:00
Bind logging of metrics errors to debug flag(s).
This commit is contained in:
parent
72e1ea8585
commit
d896e9b25d
@ -34,6 +34,8 @@ import org.bukkit.plugin.Plugin;
|
|||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
|
|
||||||
|
import fr.neatmonster.nocheatplus.config.ConfPaths;
|
||||||
|
import fr.neatmonster.nocheatplus.config.ConfigManager;
|
||||||
import fr.neatmonster.nocheatplus.logging.LogUtil;
|
import fr.neatmonster.nocheatplus.logging.LogUtil;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -504,7 +506,9 @@ public class Metrics {
|
|||||||
} else if (response.startsWith("7")) {
|
} else if (response.startsWith("7")) {
|
||||||
response = response.substring(response.startsWith("7,") ? 2 : 1);
|
response = response.substring(response.startsWith("7,") ? 2 : 1);
|
||||||
}
|
}
|
||||||
LogUtil.scheduleLogWarning("[NoCheatPlus] Metrics error: " + response); // NCP: Log response.
|
if (debug || ConfigManager.getConfigFile().getBoolean(ConfPaths.LOGGING_DEBUG)) { // NCP: Log response.
|
||||||
|
LogUtil.scheduleLogWarning("[NoCheatPlus] Metrics error: " + response);
|
||||||
|
}
|
||||||
throw new IOException(response);
|
throw new IOException(response);
|
||||||
} else {
|
} else {
|
||||||
// Is this the first update this hour?
|
// Is this the first update this hour?
|
||||||
|
Loading…
Reference in New Issue
Block a user