diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-04-10 09:00:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 09:00:22 +0200 |
| commit | 3397cc4474e3165865707182a5dcacf5bb4e68bd (patch) | |
| tree | c714eab2aae2453a01f546cb4811c87dcd18a7e7 /src/main/java/at/hannibal2/skyhanni/features | |
| parent | 8c86c32807dc697218d71bdc9eef7aef68ba90e7 (diff) | |
| download | skyhanni-3397cc4474e3165865707182a5dcacf5bb4e68bd.tar.gz skyhanni-3397cc4474e3165865707182a5dcacf5bb4e68bd.tar.bz2 skyhanni-3397cc4474e3165865707182a5dcacf5bb4e68bd.zip | |
Backend: Chat and Open Config (#1396)
Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
4 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 96baef5a3..7fd5cde54 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -328,7 +328,11 @@ object GriffinBurrowHelper { if (!isEnabled()) { if (currentMayor != Mayor.DIANA) { - ChatUtils.clickableChat("§cSelect Diana as mayor overwrite!", "sh assume mayor") + ChatUtils.chatAndOpenConfig( + "§cSelect Diana as mayor overwrite!", + SkyHanniMod.feature.dev.debug::assumeMayor + ) + } else { ChatUtils.userError("Have an Ancestral Spade in the inventory!") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt index d89437a5b..b696d05ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenCustomKeybinds.kt @@ -58,7 +58,10 @@ object GardenCustomKeybinds { .let { values -> values.size != values.toSet().size } if (areDuplicates) { if (lastDuplicateKeybindsWarnTime.passedSince() > 30.seconds) { - ChatUtils.clickableUserError("Duplicate Custom Keybinds aren't allowed!", "sh custom keybinds") + ChatUtils.chatAndOpenConfig( + "Duplicate Custom Keybinds aren't allowed!", + GardenAPI.config::keyBind + ) lastDuplicateKeybindsWarnTime = SimpleTimeMark.now() } return false diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt index 843e8e558..b746e03ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt @@ -20,10 +20,9 @@ object GardenStartLocation { return } if (!config.enabled) { - ChatUtils.clickableChat( + ChatUtils.chatAndOpenConfig( "This feature is disabled. Enable it in the config: §e/sh crop start location", - "sh crop start location", - prefixColor = "§c" + GardenAPI.config::cropStartLocation ) return } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt index 58aada3ff..a1a3c859d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt @@ -151,10 +151,9 @@ class VisitorListener { event.isCanceled = true ChatUtils.chat("§cBlocked refusing visitor ${visitor.visitorName} §7(${it.displayName}§7)") if (config.rewardWarning.bypassKey == Keyboard.KEY_NONE) { - ChatUtils.clickableChat( + ChatUtils.chatAndOpenConfig( "§eIf you want to deny this visitor, set a keybind in §e/sh bypass", - "sh bypass", - false + GardenAPI.config.visitors.rewardWarning::bypassKey ) } Minecraft.getMinecraft().thePlayer.closeScreen() |
