Skip to content

AQLChat

BilliAlpha edited this page Jan 16, 2023 · 1 revision

Need a configurable chat system ? AQLChat is the solution.

Configuration

In order to use the chat system you have to configure channels.

For instance, one can create a "whispering" channel w with a distance of 3 blocks. Only players very close to one another will receive the broadcasted message. This can be used for description, event, or ambient channels.

Channels are configured in the main AquilonThings config file (plugins/AquilonThings/config.yml) under the channels key.

Example:

channels:
  Local:
    nick: L
    color: 'f'
    distance: 200
    format: '{color}[{nick}] &7&o{sender_rp}{color}: {message}'

Each channel is made up of a name (ex: Local), a nickname or shorthand (ex: L), a minecraft color code (ex: f) and a format.

The format describes how the message will be displayed in game. It can contains special patterns that will be replaced when the message is sent.

Here is a small list of those patterns:

  • {color}: channel color, all text placed after this will be written in this color.
  • {nick}: channel nickname (or shorthand), it can be usefull to show players which channel the message was sent to.
  • {sender_color}: the player color (based on it's rank)
  • {sender_prefix}: the player rank prefix (based on it's rank)
  • {sender_suffix}: the player rank suffix (based on it's rank)
  • {sender_name}: the player name (Username)
  • {sender}: the decorated player name (based on it's rank), this is the same as: {sender_prefix}{sender_color}{sender_name}{sender_suffix}
  • {sender_rp}: the role-play name of the player (also called display name by minecraft)

A channel can also have a distance, if this distance is greater than zero the message will only be sent to the players in a radius around the sender. This distance is expressed in blocks.

You can configure as many channels as you like. Every channel has it's own permissions, they are detailed in the Permissions section.

Usage

Once your chat channels are configured you a ready to use them.

The chat system relies on one command ch.

A list of configured channels is available via the /ch list command.

To select the channel you are speaking in you can use the /ch <channel> command where <channel> is either a channel name or a channel nickname.

Using this command will make you join the channel and select it. Joining a channel means that you will receive messages sent to it. Once a channel is selected every chat message you send (except commands) will be sent to the selected channel.

You can leave a channel using /ch leave <channel> in order not to receive message in the channel. If you want to rejoin a channel that you left you can use the /ch join <channel> to join a channel without selecting it.

If you have the correct permissions you can also ban players from a channel, doing so will kick the player from the channel. The player won't be able to read or to send message to the given channel. The command is /ch ban <player> <channel>, you can also remove a ban with /ch unban <player> <channel>.

When speaking it can be annoying to have to change channel every-time, that's why you can send a one-time message to a specific channel by prefix your message with the channel nickname: /<nick> <message>. Example: /l Hey, you there !. This will send a message to the chosen channel without selecting it.

This module also provides a command for command block usage /qmsg <target> <message>. The target can be any player or * to send to all players.

All chat messages can contain minecraft formatting codes using the & character. They will be translated in to colors and formatting if you are allowed to use formatting. Example: &4Important: &7The guard stops you

Permissions

Permissions are configured per channel.

aqlthings.chat.channel.<channel>.read: Read channel messages
aqlthings.chat.channel.<channel>.speak: Send messages in the channel
aqlthings.chat.channel.<channel>.join: Ability to join the channel
aqlthings.chat.channel.<channel>.leave: Ability to leave the channel
aqlthings.chat.channel.<channel>.format: Ability to add formatting to messages in this channel
aqlthings.chat.channel.<channel>.ban: Ability to ban and un-ban players from the channel

Clone this wiki locally