Package dev.arbjerg.lavalink.client
Class Link
-
- All Implemented Interfaces:
public final class LinkA "Link" for linking a guild id to a node. Mainly just a data class that contains some shortcuts to the node. You should never store a link as it might be replaced internally without you knowing.
-
-
Constructor Summary
Constructors Constructor Description Link(Long guildId, LavalinkNode node)
-
Method Summary
Modifier and Type Method Description final LavalinkNodegetNode()final LinkStategetState()The voice connection state of this link final LonggetGuildId()final Mono<LavalinkPlayer>getPlayer()Gets the player for this link. final Mono<Unit>destroyPlayer()Destroys the player for this link. final Mono<LavalinkPlayer>updatePlayer(Consumer<PlayerUpdateBuilder> updateConsumer)final PlayerUpdateBuildercreateOrUpdatePlayer()Creates or updates the player for this link. final Mono<LoadResult>loadItem(String identifier)Load an item for the player. final UnitonVoiceServerUpdate(VoiceState newVoiceState)Booleanequals(Object other)IntegerhashCode()-
-
Constructor Detail
-
Link
Link(Long guildId, LavalinkNode node)
-
-
Method Detail
-
getNode
final LavalinkNode getNode()
-
getGuildId
final Long getGuildId()
-
getPlayer
final Mono<LavalinkPlayer> getPlayer()
Gets the player for this link. If the player is not cached, it will be retrieved from the server.
-
destroyPlayer
final Mono<Unit> destroyPlayer()
Destroys the player for this link.
-
updatePlayer
final Mono<LavalinkPlayer> updatePlayer(Consumer<PlayerUpdateBuilder> updateConsumer)
-
createOrUpdatePlayer
final PlayerUpdateBuilder createOrUpdatePlayer()
Creates or updates the player for this link.
-
loadItem
final Mono<LoadResult> loadItem(String identifier)
Load an item for the player.
- Parameters:
identifier- The identifier (E.G.
-
onVoiceServerUpdate
final Unit onVoiceServerUpdate(VoiceState newVoiceState)
-
-
-
-