aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-11 14:08:16 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-11 14:08:16 +0200
commita506971dba8c32547be47e892e8f51e38b4da0e8 (patch)
tree64045b8e3ea8294cd7a60531495649e3824200cc
parent0addf9dd07808091040e3f8004ee1710cf69812b (diff)
downloadskyhanni-a506971dba8c32547be47e892e8f51e38b4da0e8.tar.gz
skyhanni-a506971dba8c32547be47e892e8f51e38b4da0e8.tar.bz2
skyhanni-a506971dba8c32547be47e892e8f51e38b4da0e8.zip
Hopefully fixed error messages with trevor detection
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt18
1 files 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")
}
}
}