From 3ac5ceb5d3a5a3c3de36fb15f56ad94e0b2041f9 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Thu, 8 Sep 2022 11:41:49 +0200 Subject: added minecraft logging logic and filtering --- src/main/java/at/hannibal2/skyhanni/data/ApiKeyGrabber.kt | 10 +++++----- src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/ApiKeyGrabber.kt b/src/main/java/at/hannibal2/skyhanni/data/ApiKeyGrabber.kt index c3a7dada5..c35a78f4a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ApiKeyGrabber.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ApiKeyGrabber.kt @@ -82,7 +82,7 @@ class ApiKeyGrabber { } private fun readApiKeyFromOtherMods() { - println("Trying to find the API Key from the config of other mods..") + LorenzUtils.consoleLog("Trying to find the API Key from the config of other mods..") var found = false for (mod in OtherMod.values()) { @@ -93,21 +93,21 @@ class ApiKeyGrabber { try { val key = mod.readKey(reader).replace("\n", "").replace(" ", "") if (verifyKey(key)) { - println("- $modName: good key!") + LorenzUtils.consoleLog("- $modName: good key!") if (!found) { found = true LorenzUtils.chat("§e[SkyHanni] Grabbed the API key from $modName!") SkyHanniMod.feature.hidden.apiKey = key } } else { - println("- $modName: wrong key!") + LorenzUtils.consoleLog("- $modName: wrong key!") } } catch (e: Throwable) { - println("- $modName: wrong config format! (" + e.message + ")") + LorenzUtils.consoleLog("- $modName: wrong config format! (" + e.message + ")") continue } } else { - println("- $modName: no config found!") + LorenzUtils.consoleLog("- $modName: no config found!") } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 91e1240a5..2e8a7a119 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.LocationChangeEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TabListUtils import net.minecraft.client.Minecraft @@ -94,7 +95,7 @@ class HypixelData { if (mode != location) { LocationChangeEvent(location, mode).postAndCatch() - println("SkyHanni location change: '$location'") + LorenzUtils.consoleLog("SkyHanni location change: '$location'") mode = location } } -- cgit