diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index 0afc5d2fc..3091e4f85 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -171,6 +171,11 @@ public class Garden { @ConfigEditorBoolean public boolean preventRefusing = true; + @Expose + @ConfigOption(name = "Bypass Key", desc = "Hold that key to bypass the Prevent Refusing feature.") + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int bypassKey = Keyboard.KEY_NONE; + /** * Sync up with {at.hannibal2.skyhanni.features.garden.visitor.VisitorReward} diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index 5b0aafdb9..fcac2e663 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -23,6 +23,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAndItems import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.renderables.Renderable +import io.github.moulberry.moulconfig.internal.KeybindHelper import io.github.moulberry.notenoughupdates.events.SlotClickEvent import io.github.moulberry.notenoughupdates.util.MinecraftExecutor import net.minecraft.client.Minecraft @@ -269,6 +270,10 @@ class GardenVisitorFeatures { visitor.hasReward()?.let { if (config.visitorRewardWarning.preventRefusing) { + if (KeybindHelper.isKeyDown(config.visitorRewardWarning.bypassKey)) { + LorenzUtils.chat("§e[SkyHanni] §cBypassed blocking refusal of visitor ${visitor.visitorName} §7(${it.displayName}§7)") + return + } event.isCanceled = true LorenzUtils.chat("§e[SkyHanni] §cBlocked refusing visitor ${visitor.visitorName} §7(${it.displayName}§7)") Minecraft.getMinecraft().thePlayer.closeScreen() |