aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorObsidian <108832807+Obsidianninja11@users.noreply.github.com>2024-03-23 15:57:58 -0800
committerGitHub <noreply@github.com>2024-03-24 00:57:58 +0100
commit74af9cc72578129294bbc5071621da7b9dd4cdf6 (patch)
tree48b6290c428103993fe34c22fe59273d7fc7a509
parent68db886580ba88066aac566328153f30124cb2f1 (diff)
downloadskyhanni-74af9cc72578129294bbc5071621da7b9dd4cdf6.tar.gz
skyhanni-74af9cc72578129294bbc5071621da7b9dd4cdf6.tar.bz2
skyhanni-74af9cc72578129294bbc5071621da7b9dd4cdf6.zip
Improvement: Allow teleporting when in an infested plot (#1140)
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestFinderConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestFinderConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestFinderConfig.java
index f76190328..b5088222f 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestFinderConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/pests/PestFinderConfig.java
@@ -53,4 +53,9 @@ public class PestFinderConfig {
@ConfigOption(name = "Teleport Hotkey", desc = "Press this key to warp to the nearest plot with pests on it.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
public int teleportHotkey = Keyboard.KEY_NONE;
+
+ @Expose
+ @ConfigOption(name = "Always Teleport", desc = "Allow teleporting with the Teleport Hotkey even when you're already in an infested plot.")
+ @ConfigEditorBoolean
+ public boolean alwaysTp = false;
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
index 2833cc4ed..9b1a73a05 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
@@ -143,7 +143,7 @@ class PestFinder {
return
}
- if (plot.isPlayerInside()) {
+ if (plot.isPlayerInside() && !config.alwaysTp) {
ChatUtils.userError("You're already in an infested plot!")
return
}