Skip to content

Commit f4f7c58

Browse files
committed
Send over position when setting track
1 parent 0807d1d commit f4f7c58

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/kotlin/dev/arbjerg/lavalink/client/IUpdatablePlayer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import dev.arbjerg.lavalink.client.protocol.TrackUpdateBuilder
99
interface IUpdatablePlayer {
1010
/**
1111
* Shortcut for setting the encoded track. This will also send any user-data supplied.
12+
* Please keep in mind that this will set the position field to the current position of the track.
1213
*
1314
* @param track The track to apply to this builder
1415
*

src/main/kotlin/dev/arbjerg/lavalink/client/PlayerUpdateBuilder.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class PlayerUpdateBuilder internal constructor(private val node: LavalinkNode, p
2323
userData = track?.userData?.toKotlin().toOmissible()
2424
).toOmissible()
2525

26+
this.position = track?.info?.position.toOmissible()
27+
2628
return this
2729
}
2830

0 commit comments

Comments
 (0)