From 74af9cc72578129294bbc5071621da7b9dd4cdf6 Mon Sep 17 00:00:00 2001 From: Obsidian <108832807+Obsidianninja11@users.noreply.github.com> Date: Sat, 23 Mar 2024 15:57:58 -0800 Subject: Improvement: Allow teleporting when in an infested plot (#1140) --- .../skyhanni/config/features/garden/pests/PestFinderConfig.java | 5 +++++ .../java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') 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 } -- cgit