Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Channels

Matej Pacan edited this page Dec 1, 2020 · 22 revisions

Chat channels are chatting rooms to which players may join or leave at their will (or if they have the proper permission). They are found in channels.yml. They reduce chat spam on big servers noticeably because players are divided into different channels (for example standard channel, help-op channel, trade channel and admin channel) instead of everyone writing on the main server chat.

Creating / Removing Channels

Adding new or deleting channels you don't want is as easy as just removing or adding the entire config section! Below you find the channels 'standard' and 'global', and you can simply delete the entire standard channel with all indented keys to remove the channel.

Channels: 
  #
  # This is the standard channel - the default one for all players.
  #
  standard: 
    #
    # A configuration value to this channel:
    # This format is changeable in formatting.yml
    #
    Format: Chat    

  #
  # The default global channel with bungee support.
  #
  global: 
    #
    # This format is changeable in formatting.yml
    #
    Format: Global_Chat
    #
    # This channel sends the messages to the Bungeecords.
    #
    Bungee: true

Auto Join

If you want to put players automatically into a channel when they log-in, give them the following permissions:

chatcontrol.channel.{channel}.join.{mode}
chatcontrol.channel.autojoin.{channel}.{mode}

Replace the {channel} with the channel name, and the {mode} with the channel mode ('write', 'spy' or 'read').

The first permission will allow them to join to the channel, and the second instruct the plugin to put them into the channel automatically when they join in. Both are required.

When a player leaves the channel manually, he won't be put into it until the server has been restarted, reloaded, or Reset_Cache_On_Quit option in settings.yml is on true.

TIP: To understand how auto-join works in-game, set Debug to [channels] in settings.yml and restart.

Custom channel commands

You can use your commands.yml file in the root server folder to setup custom commands such as "/tc" to join/leave the channel, or if your command contains anything after it, it will simply send a message to your channel, creating a very handy alias.

a

Configuration

You only need to specify the 'Format', that means how the message looks like. All the other options are optional!

Format

Info: How the message should look like in the chat?

Accepts: String

Either specify the formatter from formats.yml

Format: Some_Format

Or the format directly

Format: '{pl_prefix+}{player}:{pl_suffix+} {message}'

Console Format

Info: How the message looks like in the console?

Accepts: String

Console_Format: '{channel} {player}: {message}'

Log Format

Info: If set, the message will be logged into ChatControl/logs/{channel}.yml file with the format you specify.

Accepts: String

Log_Format: '{player}: {message}'

Range

Info: If set, how far from the sender will other players receive the message (works like ranged chat)?

Accepts: Whole number or '*' for per-world channel

Range: 100
Range: '*' // For per-world channel

Bungee

Info: Send the message to BungeeCords? It will be shown on each server where the channel with the same name is configured

Accepts: Boolean

Bungee: true

Discord

Info: Send or receive messages from Discord using DiscordSRV plugin? You must link your channel in DiscordSRV properly before you can use this option. Defaults to enabled. If you set this explicitly to false, we will cancel incoming Discord messages and won't send any - useful for ranged channels.

Accepts: Boolean

Default: true

Discord: true

Party

Info: Should the message only be visible to players in the same party?

Accepts: String

Supported:

  • town [Players in sender's town in Towny.]
  • nation [Players in sender's nation in Towny.]
  • faction [Players in sender's faction in Factions.]
  • feudal [Players in sender's Feudal chat mode (either kingdom or ally).]
  • kingdom [Players in sender's kingdom in Feudal.]
  • feudal_ally [Players in sender's kingdom and all of its allied kingdoms in Feudal.]
  • plot [All players within the a PlotSquared plot.]
Party: town