joinChannel

fun joinChannel(playerId: UUID, channelId: String, bypassPrivateCheck: Boolean = false): Result<Unit>(source)

Adds a player to a channel as a member and sets it as their active channel. If the player is already a member of other channels, they remain members of those channels. Only one channel can be active at a time.

Return

Result indicating success or failure.

Parameters

playerId

The UUID of the player.

channelId

The ID of the channel.

bypassPrivateCheck

If true, allows joining private channels without invitation (used for invites).

Throws

if the channel does not exist.

if the player is already a member of this channel.

if the player has reached the maximum channel membership limit.

for other runtime errors.