Interface ChannelPermissions


public interface ChannelPermissions
Permissions handling for a channel.
Since:
3.0.0
  • Method Details

    • joinPermitted

      ChannelPermissionResult joinPermitted(CarbonPlayer carbonPlayer)
      Checks if the player may join this channel.
      Parameters:
      carbonPlayer - the player attempting to join
      Returns:
      if the player may join
      Since:
      3.0.0
    • speechPermitted

      ChannelPermissionResult speechPermitted(CarbonPlayer carbonPlayer)
      Checks if the player may send messages in this channel.
      Parameters:
      carbonPlayer - the player attempting to speak
      Returns:
      if the player may speak
      Since:
      3.0.0
    • hearingPermitted

      ChannelPermissionResult hearingPermitted(CarbonPlayer player)
      Checks if the player may receive messages from this channel.
      Parameters:
      player - the player that's receiving messages
      Returns:
      if the player may receive messages
      Since:
      3.0.0
    • dynamic

      boolean dynamic()
      Returns whether the result of joinPermitted(CarbonPlayer) is dynamic.

      An example of a dynamic permissions is the built-in party channel that only allows players in a party to join.

      An example of static permissions is the built-in config channels that simply check permission strings. The fact that a player's permissions may change during gameplay does not make the permission dynamic, as the server will resend commands on permission changes.

      If the result is static, then we can avoid sending commands to the player that they will just get denied use of on execute. If it's dynamic, we must send the command regardless in case they gain permission later.

      Returns:
      whether the permissions are dynamic
      Since:
      3.0.0
    • uniformDynamic

      Parameters:
      check - permission check
      Returns:
      new permissions object
      Since:
      3.0.0