diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index 3358db12f..1ac453a8d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -199,6 +199,13 @@ public class MiscConfig { public boolean showTimeInLimbo = true; @Expose + @ConfigOption( + name = "Lock Mouse Message", + desc = "Show a message in chat when toggling the /shmouselock.") + @ConfigEditorBoolean + public boolean lockMouseLookChatMessage = true; + + @Expose public Position showTimeInLimboPosition = new Position(400, 200, 1.3f); @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt index d9887a26e..4c51d3c3c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt @@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object LockMouseLook { + private val config get() = SkyHanniMod.feature.misc private var lockedMouse = false private const val lockedPosition = -1F / 3F @@ -29,16 +30,20 @@ object LockMouseLook { if (lockedMouse) { SkyHanniMod.feature.storage.savedMouseSensitivity = gameSettings.mouseSensitivity gameSettings.mouseSensitivity = lockedPosition - LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now locked. Type /shmouselock to unlock your rotation") + if (config.lockMouseLookChatMessage) { + LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now locked. Type /shmouselock to unlock your rotation") + } } else { gameSettings.mouseSensitivity = SkyHanniMod.feature.storage.savedMouseSensitivity - LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now unlocked.") + if (config.lockMouseLookChatMessage) { + LorenzUtils.chat("§e[SkyHanni] §bMouse rotation is now unlocked.") + } } } @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (!lockedMouse) return - SkyHanniMod.feature.misc.lockedMouseDisplay.renderString("§eMouse Locked", posLabel = "Mouse Locked") + config.lockedMouseDisplay.renderString("§eMouse Locked", posLabel = "Mouse Locked") } } |