diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-19 12:55:46 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-19 12:55:46 +0100 |
commit | bd0283998631bac9c433de6ace58e71d32a2123d (patch) | |
tree | 2f1dd5ef332f83ab39bc9c0c0d4059a2906110c9 /src/main/java/at/hannibal2/skyhanni/features/misc | |
parent | 6bdcc845e8397041c44b5271af245597caf26353 (diff) | |
download | skyhanni-bd0283998631bac9c433de6ace58e71d32a2123d.tar.gz skyhanni-bd0283998631bac9c433de6ace58e71d32a2123d.tar.bz2 skyhanni-bd0283998631bac9c433de6ace58e71d32a2123d.zip |
logError -> logErrorWithData
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt index 467dad0ff..cfb679c30 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PetExpTooltip.kt @@ -25,7 +25,6 @@ class PetExpTooltip { private val level100Common = 5_624_785 private val level100Legendary = 25_353_230 private val level200 = 210_255_385 - private var debugInfoPrinted = false @SubscribeEvent(priority = EventPriority.LOWEST) fun onItemTooltipLow(event: ItemTooltipEvent) { @@ -59,21 +58,15 @@ class PetExpTooltip { event.toolTip.add(index, "§7Progress to ${addLegendaryColor}Level $maxLevel: §e$percentageFormat") } } catch (e: Exception) { - if (!debugInfoPrinted) { - println(" ") - println("PetExpTooltip debug:") - println("itemStack: $itemStack") - println("itemStack.name: $name") - println("petExperience: $petExperience") - println("event.toolTip: ${event.toolTip}") - println(" ") - println("findIndex(event.toolTip): ${findIndex(event.toolTip)}") - println(" ") - println("itemStack.getLore(): ${itemStack.getLore()}") - println(" ") - debugInfoPrinted = true - } - ErrorManager.logError(e, "Could not add pet exp tooltip. Show the console for more info") + ErrorManager.logErrorWithData( + e, "Could not add pet exp tooltip", + "itemStack" to itemStack, + "item name" to name, + "petExperience" to petExperience, + "toolTip" to event.toolTip, + "index" to findIndex(event.toolTip), + "getLore" to itemStack.getLore(), + ) } } |