diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-14 16:27:10 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-14 16:27:10 +0200 |
commit | 7b5f78fe30e2c84ea5a9bf01f92bb8ea4397a19a (patch) | |
tree | 3af4a0a6955e4ea81f7e008ded4f196c01fb4998 /src/main/java/at/hannibal2/skyhanni/utils | |
parent | b4648fe70ce0538325ed6df3ad068e9fe9237c0c (diff) | |
download | skyhanni-7b5f78fe30e2c84ea5a9bf01f92bb8ea4397a19a.tar.gz skyhanni-7b5f78fe30e2c84ea5a9bf01f92bb8ea4397a19a.tar.bz2 skyhanni-7b5f78fe30e2c84ea5a9bf01f92bb8ea4397a19a.zip |
renamed CopyErrorCommand to ErrorManager
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
8 files changed, 21 insertions, 21 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt index 7f9de6685..c0116f57c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/APIUtil.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import com.google.gson.JsonElement import com.google.gson.JsonObject import com.google.gson.JsonParser @@ -67,7 +67,7 @@ object APIUtil { e.printStackTrace() } else { - CopyErrorCommand.logError( + ErrorManager.logError( Error("$apiName error for url: '$urlString'", e), "Failed to load data from $apiName" ) @@ -79,7 +79,7 @@ object APIUtil { if (silentError) { throw throwable } else { - CopyErrorCommand.logError( + ErrorManager.logError( Error("$apiName error for url: '$urlString'", throwable), "Failed to load data from $apiName" ) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt index 09ce8a835..fb47fc521 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -44,7 +44,7 @@ object ClipboardUtils { getClipboard()?.setContents(StringSelection(text), null) } catch (e: Exception) { if (step == 3) { - CopyErrorCommand.logError(e, "Error while trying to access the clipboard.") + ErrorManager.logError(e, "Error while trying to access the clipboard.") } else { copyToClipboard(text, step + 1) } @@ -63,7 +63,7 @@ object ClipboardUtils { } } catch (e: Exception) { return if (step == 3) { - CopyErrorCommand.logError(e, "Error while trying to access the clipboard.") + ErrorManager.logError(e, "Error while trying to access the clipboard.") null } else { readFromClipboard(step + 1) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt index 30853c9ca..0bdf25a71 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent import at.hannibal2.skyhanni.mixins.transformers.CustomRenderGlobal -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import net.minecraft.client.Minecraft import net.minecraft.client.renderer.GlStateManager import net.minecraft.client.renderer.OpenGlHelper @@ -366,7 +366,7 @@ object EntityOutlineRenderer { val renderGlobal = try { mc.renderGlobal as CustomRenderGlobal } catch (e: NoClassDefFoundError) { - CopyErrorCommand.logError(e, "Unable to enable entity outlines, the required mixin is not loaded") + ErrorManager.logError(e, "Unable to enable entity outlines, the required mixin is not loaded") isMissingMixin = true return } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index d3298e0b0..4b405d1cc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.utils -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUItems.getItemStack import at.hannibal2.skyhanni.utils.NumberUtil.formatNumber @@ -217,7 +217,7 @@ object ItemUtils { val rarity = LorenzRarity.readItemRarity(this) data.itemRarity = rarity if (rarity == null && logError) { - CopyErrorCommand.logErrorState( + ErrorManager.logErrorState( "Could not read rarity for item $name", "getItemRarityOrNull not found for: $internalName, name:'$name''" ) @@ -310,7 +310,7 @@ object ItemUtils { val rarity = LorenzRarity.getById(rarityId) val name = pet.name if (rarity == null) { - CopyErrorCommand.logErrorState( + ErrorManager.logErrorState( "Could not read rarity for pet $name", "getPetRarity not found for: ${pet.getInternalName()}, name:'$name'" ) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzColor.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzColor.kt index 6fdfaa2af..fe3c3bc94 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzColor.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzColor.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.utils -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import net.minecraft.item.EnumDyeColor import java.awt.Color @@ -49,7 +49,7 @@ enum class LorenzColor(private var chatColorCode: Char, private val color: Color EnumDyeColor.PURPLE -> DARK_PURPLE EnumDyeColor.YELLOW -> YELLOW else -> { - CopyErrorCommand.logError( + ErrorManager.logError( Exception("Unknown dye color: $this"), "Unknown dye color: $this" ) diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt index 58370bc80..306a54c50 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzRarity.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.utils
-import at.hannibal2.skyhanni.test.command.CopyErrorCommand
+import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import net.minecraft.item.ItemStack
@@ -29,7 +29,7 @@ enum class LorenzRarity(val color: LorenzColor, val id: Int) { fun oneBelow(logError: Boolean = true): LorenzRarity? {
val rarityBelow = getById(ordinal - 1)
if (rarityBelow == null && logError) {
- CopyErrorCommand.logErrorState(
+ ErrorManager.logErrorState(
"Problem with item rarity detected.",
"Trying to get an item rarity below common"
)
@@ -40,7 +40,7 @@ enum class LorenzRarity(val color: LorenzColor, val id: Int) { fun oneAbove(logError: Boolean = true): LorenzRarity? {
val rarityBelow = getById(ordinal + 1)
if (rarityBelow == null && logError) {
- CopyErrorCommand.logErrorState(
+ ErrorManager.logErrorState(
"Problem with item rarity detected.",
"Trying to get an item rarity above special"
)
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index 6e943b059..ab21c47b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.features.bazaar.BazaarDataHolder -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_old import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -182,7 +182,7 @@ object NEUItems { if (definite) { Utils.showOutdatedRepoNotification() } - CopyErrorCommand.logError( + ErrorManager.logError( IllegalStateException("Something went wrong!"), "Encountered an error getting the item for §7$this§c. " + "This may be because your NEU repo is outdated. Please ask in the SkyHanni " + diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index 385a40619..416b7dfd3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.test.command.CopyErrorCommand +import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.toSingletonListOrEmpty import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine_nea @@ -40,7 +40,7 @@ class ParkourHelper( fun render(event: LorenzRenderWorldEvent) { if (locations.isEmpty()) { - CopyErrorCommand.logError( + ErrorManager.logError( IllegalArgumentException("locations is empty"), "Trying to render an empty parkour" ) @@ -118,7 +118,7 @@ class ParkourHelper( } } } catch (e: Throwable) { - CopyErrorCommand.logError(e, "Error while rendering a parkour") + ErrorManager.logError(e, "Error while rendering a parkour") } } |