Skip to content

Commit 0ca4d83

Browse files
Changed delay setting from seconds to ms, should be nicer.
1 parent 205865d commit 0ca4d83

File tree

1 file changed

+3
-3
lines changed
  • src/main/kotlin/com/lambda/client/module/modules/misc

1 file changed

+3
-3
lines changed

src/main/kotlin/com/lambda/client/module/modules/misc/DiscordRPC.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object DiscordRPC : Module(
3535
private val line2Left by setting("Line 2 Left", LineInfo.DIMENSION) // state left
3636
private val line2Right by setting("Line 2 Right", LineInfo.HEALTH) // state right
3737
private val coordsConfirm by setting("Coords Confirm", false, { showCoordsConfirm() })
38-
private val delay by setting("Update Delay", 5, 1..60, 1, unit = " s")
38+
private val delay by setting("Update Delay", 200, 200..2000, 1, unit = "ms")
3939

4040
private enum class LineInfo {
4141
VERSION, WORLD, DIMENSION, USERNAME, HEALTH, HUNGER, SERVER_IP, COORDS, SPEED, HELD_ITEM, FPS, TPS, NONE
@@ -46,8 +46,8 @@ object DiscordRPC : Module(
4646
private var initialised = false
4747
private val rpcBuilder = RichPresence.Builder()
4848
.setLargeImage("default", "https://github.com/lambda-client/lambda/")
49-
private val timer = TickTimer(TimeUnit.SECONDS)
50-
private val job = BackgroundJob("Discord RPC", { delay * 1000L }) { updateRPC() }
49+
private val timer = TickTimer(TimeUnit.MILLISECONDS)
50+
private val job = BackgroundJob("Discord RPC", { delay * 200L }) { updateRPC() }
5151

5252
init {
5353
onEnable {

0 commit comments

Comments
 (0)