aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-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")
}
}
}