From a506971dba8c32547be47e892e8f51e38b4da0e8 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 11 May 2023 14:08:16 +0200 Subject: Hopefully fixed error messages with trevor detection --- .../skyhanni/features/misc/trevor/TrevorFeatures.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 21427c6b0..7280ae4bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -52,15 +52,17 @@ class TrevorFeatures { init { fixedRateTimer(name = "skyhanni-update-trapper", period = 1000L) { - try { - if (onFarmingIsland()) { - updateTrapper() - TrevorSolver.findMob() + Minecraft.getMinecraft().addScheduledTask { + try { + if (onFarmingIsland()) { + updateTrapper() + TrevorSolver.findMob() + } + } catch (error: Throwable) { + CopyErrorCommand.errorMessage = error.toString() + CopyErrorCommand.errorStackTrace = error.stackTrace.asList() + LorenzUtils.chat("§c[SkyHanni] encountered an error when updating the trapper solver, please run /shcopyerror") } - } catch (error: Throwable) { - CopyErrorCommand.errorMessage = error.toString() - CopyErrorCommand.errorStackTrace = error.stackTrace.asList() - LorenzUtils.chat("§c[SkyHanni] encountered an error when updating the trapper solver, please run /shcopyerror") } } } -- cgit