ChannelMembershipManager
class ChannelMembershipManager(channelManager: ChannelManager, logger: Logger, config: ChannelChatFeatureConfig, hasModerationBypass: (UUID) -> Boolean = ::hasChannelBypassPermission)(source)
Parameters
hasModerationBypass
Whether a player is exempt from being kicked or banned. Injected rather than read from Bukkit inline so this manager stays testable without a running server.
Constructors
Link copied to clipboard
constructor(channelManager: ChannelManager, logger: Logger, config: ChannelChatFeatureConfig, hasModerationBypass: (UUID) -> Boolean = ::hasChannelBypassPermission)
Functions
Link copied to clipboard
Gets the role of a member in a channel.
Link copied to clipboard
Gets the role of a member in a channel without throwing exceptions.
Link copied to clipboard
Gets all channels where the player is a member.
Link copied to clipboard
Link copied to clipboard
fun joinChannel(playerId: UUID, channelId: String, bypassPrivateCheck: Boolean = false): Result<Unit>
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.
Link copied to clipboard
Link copied to clipboard
Removes the player from the active channel completely. The player will be removed from the channel membership and the active channel will be cleared.
Link copied to clipboard
Switches the player's active channel to a channel they are already a member of.