Interface ChatChannel

All Superinterfaces:
ChatComponentRenderer, Keyed

ChatChannel interface, supplies a formatter and filters recipients.
Extends Keyed for identification purposes.
Since:
2.0.0
  • Method Details

    • permissions

      ChannelPermissions permissions()
      Returns the permissions handler for the channel.
      Returns:
      the permissions handler
      Since:
      3.0.0
    • recipients

      List<Audience> recipients(CarbonPlayer sender)
      Returns a list of all recipients that will receive messages from the sender.
      Parameters:
      sender - the sender of messages
      Returns:
      the recipients
      Since:
      2.0.0
    • quickPrefix

      @Nullable String quickPrefix()
      Messages will be sent in this channel if they start with this prefix.
      Returns:
      the message prefix that sends messages in this channel
      Since:
      2.0.0
    • shouldRegisterCommands

      boolean shouldRegisterCommands()
      If commands should be registered for this channel.
      Returns:
      if commands should be registered for this channel.
      Since:
      2.0.0
    • commandName

      String commandName()
      The text that can be used to refer to this channel in commands.
      Returns:
      this channel's name when used in commands
      Since:
      2.0.0
    • commandAliases

      List<String> commandAliases()
      Alternative command names for this channel.
      Returns:
      alternative command names
      Since:
      2.0.0
    • radius

      double radius()
      The distance from the sender players must be to receive chat messages.
      Return of '0' means players must be in the same world/server.
      Return of '-1' means there is no radius.
      Returns:
      the channel radius
      Since:
      3.0.0
    • emptyRadiusRecipientsMessage

      boolean emptyRadiusRecipientsMessage()
      If the empty receipt message should be sent to the sender.
      Returns:
      Returns true if the channel should display a message when a player is out of range.
      Since:
      3.0.0
    • cooldown

      long cooldown()
      The time in milliseconds between player messages. -1 and 0 disable the cooldown for this channel.
      Returns:
      The message cooldown in millis.
      Since:
      3.0.0
    • playerCooldown

      long playerCooldown(CarbonPlayer player)
      The epoch time (millis) when the player's cooldown expires.
      Parameters:
      player - The player
      Returns:
      The epoch time (millis) when the player's cooldown expires.
      Since:
      3.0.0
    • startCooldown

      long startCooldown(CarbonPlayer player)
      Starts the cooldown timer for the specified player. Duration will be the channel cooldown. Returns the player's old cooldown time, if they have one.
      Parameters:
      player - The player
      Returns:
      The player's old cooldown, or 0 if they don't have one.
      Since:
      3.0.0
    • shouldCrossServer

      boolean shouldCrossServer()
      Whether messages from this channel should be broadcast and sent to other servers.
      Returns:
      if this channel's messages should be sent cross-server
      Since:
      3.0.0