We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8edae46 commit d282cb4Copy full SHA for d282cb4
src/main/kotlin/dev/arbjerg/lavalink/client/LavalinkNode.kt
@@ -29,6 +29,7 @@ import reactor.util.retry.Retry
29
import java.io.Closeable
30
import java.io.IOException
31
import java.time.Duration
32
+import java.util.*
33
import java.util.concurrent.ConcurrentHashMap
34
import java.util.concurrent.TimeUnit
35
import java.util.function.Consumer
@@ -427,6 +428,11 @@ class LavalinkNode(
427
428
*/
429
fun getCachedPlayer(guildId: Long): LavalinkPlayer? = playerCache[guildId]
430
431
+ /**
432
+ * @return an unmodifiable view of all cached players for this node.
433
+ */
434
+ fun getCachedPlayers(): Map<Long, LavalinkPlayer> = Collections.unmodifiableMap(playerCache)
435
+
436
internal fun transferOrphansToSelf() {
437
lavalink.transferOrphansTo(this)
438
}
0 commit comments