From 0ca4d83e72a6e6c143fbaa1a35cb08b5b2963fab Mon Sep 17 00:00:00 2001 From: CozyMeli-gitv2 <110065125+CozyMeli-gitv2@users.noreply.github.com> Date: Mon, 10 Oct 2022 12:58:51 -0400 Subject: [PATCH] Changed delay setting from seconds to ms, should be nicer. --- .../com/lambda/client/module/modules/misc/DiscordRPC.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/lambda/client/module/modules/misc/DiscordRPC.kt b/src/main/kotlin/com/lambda/client/module/modules/misc/DiscordRPC.kt index e1f1faf68..70e349110 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/misc/DiscordRPC.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/misc/DiscordRPC.kt @@ -35,7 +35,7 @@ object DiscordRPC : Module( private val line2Left by setting("Line 2 Left", LineInfo.DIMENSION) // state left private val line2Right by setting("Line 2 Right", LineInfo.HEALTH) // state right private val coordsConfirm by setting("Coords Confirm", false, { showCoordsConfirm() }) - private val delay by setting("Update Delay", 5, 1..60, 1, unit = " s") + private val delay by setting("Update Delay", 200, 200..2000, 1, unit = "ms") private enum class LineInfo { VERSION, WORLD, DIMENSION, USERNAME, HEALTH, HUNGER, SERVER_IP, COORDS, SPEED, HELD_ITEM, FPS, TPS, NONE @@ -46,8 +46,8 @@ object DiscordRPC : Module( private var initialised = false private val rpcBuilder = RichPresence.Builder() .setLargeImage("default", "https://github.com/lambda-client/lambda/") - private val timer = TickTimer(TimeUnit.SECONDS) - private val job = BackgroundJob("Discord RPC", { delay * 1000L }) { updateRPC() } + private val timer = TickTimer(TimeUnit.MILLISECONDS) + private val job = BackgroundJob("Discord RPC", { delay * 200L }) { updateRPC() } init { onEnable {