The Chat Module handles changing how chat looks when players send public messages. Whilst there are no commands involved, the chat module is perhaps the module that is most visible on the server.
Chat works best when coupled with a permission plugin that supports options.
In the main.conf
file, chat
section, the following options are available:
modifychat
: if true
, the chat format will be modified.template.prefix
: The prefix to all messages sent, if set. Set to empty to disable.template.suffix
: The suffix to all message sent, if set. Set to empty to disable.If modifychat
is set to true
, when someone sends a public chat message, the message will start with whatever is
specified in template.default.prefix
, and will be followed by whatever is specified in template.default.suffix
.
The templates support various tokens.
{{name}}
: The player’s name{{displayname}}
: The player’s set display name. Usually, this is the users nickname if they have one, or their in-game name otherwise.{{prefix}}
: The player’s prefix tag, if one is set in the permission plugin. This is NOT the same as the template prefix, defined above.{{suffix}}
: The player’s suffix tag, if one is set in the permission plugin. This is NOT the same as the template suffix, defined above.The templates also support Minecraft colour codes,
replacing §
with &
.
If you want to change the colour of a player’s name in general, don’t add a colour code to the end of the prefix. Instead,
use the namecolor
permission option, as this will tell Nucleus to use that colour all across the plugin.
Different groups can have different chat templates to the default defined in template.default
. To give a group a different template,
simply add the name of the group and the template like so. Note that the name of the group is case sensitive, so the “Admin” group
must have an entry for “Admin”. Multiple entries can be added like so:
templates {
...
group-templates {
Admin {
prefix="{{prefix}} {{displayname}}&f A>: "
suffix=" {{suffix}}"
}
Moderator {
prefix="{{prefix}} {{displayname}}&f M>: "
suffix=" {{suffix}}"
}
}
}
To set a player’s or group’s prefix or suffix tag, a permissions plugin that supports options must be installed, such as
PermissionsEx. To set the prefix tag, simply set the desired tag to the prefix
option, similarly, with the suffix tag,
set the suffix
option. Both these tags support colour codes, as above.
For example, to set the the prefix [Mod] for the “mod” group, run the command (based on your permissions plugin):
Nucleus, as of 0.9, supports custom tokens other than “prefix” and “suffix”. In the chat formatting string, you can add the following tags:
{{o:[option-name]}}
- replaced by the text in option “rank”, if any.{{o:[option-name]:s}}
- replaced by the text in option “rank”, if any. If there is text in the option, adds a space afterwards.In both cases, the option name is whatever you called the option. So, if you wanted a token called rank
on a moderator with the
string [Rank]
before the prefix, you would run the following command (again, this varies based on your permissions plugin):
then have the following template:
"{{o:rank:s}}{{prefix}} {{displayname}}&f>: "
If you also had a default group with the tag “[Default]”, this would display “[Rank] [Mod] name> chat” for moderators, and “[Default] name> chat” for default players.
Messages themselves can also be formatted using colour codes and formats, prefixing the codes with &
characters.
“Magic” characters can also be sent using &k
, and reset using &r
.
The message formatting can be controlled by permissions - which are listed below.
Since 0.4, URLs are detected by Nucleus and are made clickable. This requires the nucleus.chat.url
permission.
If you have a compatible permissions plugin installed, setting a player’s (or their group’s) namecolor
/namecolour
permission option will colour their
display name that colour be default. This can be overridden by players who can use colour codes in their nicknames.
This option accepts both names of colours and single character Minecraft colour codes - that is, black
and 0
will both colour the player’s name
in black.
As an example, if you wanted the default name colour for a player in the “mod” group to be aqua, you could run the following command (varying based on your permission plugin):
If you have a compatible permissions plugin installed, setting a player’s (or their group’s) chatcolor
/chatcolour
permission option will colour their
chat that colour by default. This can be overridden by players who can use colour codes in their chat.
Like namecolour
, this accepts both named colours and single character colour codes.
As an example, if you wanted the default chat colour for a player in the “mod” group to be aqua, you could run the following command (varying based on your permission plugin):
If you have a compatible permissions plugin installed, setting a player’s (or their group’s) chatstyle
permission option
will set the style of their chat automatically. This can be overridden by players who can use colour codes in their chat.
chatstyle
can accept multiple styles which are comma separated, and both single character and named styles are accepted.
To set the style as bold and italic, set the chatstyle
option to l,o
or bold,italic
.
If you were to add the italic and bold styles to the mod group, an example command to run would be:
The following are incompatibilities that may occur with this module, along with how to resolve the problem. For the full mod/plugin incompatibility list, see the compatibility page.
Reason: Simple Tags overrides the "header" section of the chat message on a late priority and will remove anything there, including Nucleus tags.
Resolution: Remove SimpleTags (it is no longer under development anyway).
Reason: UltimateChat does not use the Nucleus chat formatting by default, but this can be used by adjusting your UltimateChat settings.
Resolution: Update your UltimateChat configuration to use Nucleus chat formatting.
Reason: FTB Utilities alters the chat and may override the Nucleus configuration.
Resolution: Disable FTB Utilities chat-override options, specifically the option "B:override_chat".
Reason: PokeTeams prevents the normal chat event from reaching Nucleus when chatting in teams or alliances.
Resolution: Do not allow team/alliance chat if you always want chat tags.
Aliases:
me
action
Root command aliases:
/nme
Usage: /me <message…>
Default Role: USER
Basic Command Permission: nucleus.me.base
Permissions
nucleus.me.exempt.cost
- Default Role: ADMIN nucleus.me.base
- Default Role: USER nucleus.me.exempt.warmup
- Default Role: ADMIN nucleus.me.exempt.cooldown
- Default Role: ADMIN
This command is an equivalent to the following command(s) in Essentials:
/me
, /action
, /describe
Permission | Suggested Role | Description |
---|---|---|
nucleus.chat.color | ADMIN | Allows user to type colors in chat. |
nucleus.chat.color.aqua | ADMIN | Allows user to use the color "aqua" (&b) in chat. |
nucleus.chat.color.black | ADMIN | Allows user to use the color "black" (&0) in chat. |
nucleus.chat.color.blue | ADMIN | Allows user to use the color "blue" (&9) in chat. |
nucleus.chat.color.dark_aqua | ADMIN | Allows user to use the color "dark_aqua" (&3) in chat. |
nucleus.chat.color.dark_blue | ADMIN | Allows user to use the color "dark_blue" (&1) in chat. |
nucleus.chat.color.dark_gray | ADMIN | Allows user to use the color "dark_gray" (&8) in chat. |
nucleus.chat.color.dark_green | ADMIN | Allows user to use the color "dark_green" (&2) in chat. |
nucleus.chat.color.dark_purple | ADMIN | Allows user to use the color "dark_purple" (&5) in chat. |
nucleus.chat.color.dark_red | ADMIN | Allows user to use the color "dark_red" (&4) in chat. |
nucleus.chat.color.gold | ADMIN | Allows user to use the color "gold" (&6) in chat. |
nucleus.chat.color.gray | ADMIN | Allows user to use the color "gray" (&7) in chat. |
nucleus.chat.color.green | ADMIN | Allows user to use the color "green" (&a) in chat. |
nucleus.chat.color.light_purple | ADMIN | Allows user to use the color "light_purple" (&d) in chat. |
nucleus.chat.color.red | ADMIN | Allows user to use the color "red" (&c) in chat. |
nucleus.chat.color.white | ADMIN | Allows user to use the color "white" (&f) in chat. |
nucleus.chat.color.yellow | ADMIN | Allows user to use the color "yellow" (&e) in chat. |
nucleus.chat.colour | ADMIN | Allows user to type colours in chat. |
nucleus.chat.colour.aqua | ADMIN | Allows user to use the colour "aqua" (&b) in chat. |
nucleus.chat.colour.black | ADMIN | Allows user to use the colour "black" (&0) in chat. |
nucleus.chat.colour.blue | ADMIN | Allows user to use the colour "blue" (&9) in chat. |
nucleus.chat.colour.dark_aqua | ADMIN | Allows user to use the colour "dark_aqua" (&3) in chat. |
nucleus.chat.colour.dark_blue | ADMIN | Allows user to use the colour "dark_blue" (&1) in chat. |
nucleus.chat.colour.dark_gray | ADMIN | Allows user to use the colour "dark_gray" (&8) in chat. |
nucleus.chat.colour.dark_green | ADMIN | Allows user to use the colour "dark_green" (&2) in chat. |
nucleus.chat.colour.dark_purple | ADMIN | Allows user to use the colour "dark_purple" (&5) in chat. |
nucleus.chat.colour.dark_red | ADMIN | Allows user to use the colour "dark_red" (&4) in chat. |
nucleus.chat.colour.gold | ADMIN | Allows user to use the colour "gold" (&6) in chat. |
nucleus.chat.colour.gray | ADMIN | Allows user to use the colour "gray" (&7) in chat. |
nucleus.chat.colour.green | ADMIN | Allows user to use the colour "green" (&a) in chat. |
nucleus.chat.colour.light_purple | ADMIN | Allows user to use the colour "light_purple" (&d) in chat. |
nucleus.chat.colour.red | ADMIN | Allows user to use the colour "red" (&c) in chat. |
nucleus.chat.colour.white | ADMIN | Allows user to use the colour "white" (&f) in chat. |
nucleus.chat.colour.yellow | ADMIN | Allows user to use the colour "yellow" (&e) in chat. |
nucleus.chat.magic | ADMIN | Allows user to use magic characters in chat. |
nucleus.chat.style | ADMIN | Allows user to use styles in chat. |
nucleus.chat.style.bold | ADMIN | Allows user to use the "bold" style (&l) in chat. |
nucleus.chat.style.italic | ADMIN | Allows user to use the "italic" style (&o) in chat. |
nucleus.chat.style.reset | ADMIN | Allows user to use the "reset" style (&r) in chat. |
nucleus.chat.style.strikethrough | ADMIN | Allows user to use the "strikethrough" style (&m) in chat. |
nucleus.chat.style.underline | ADMIN | Allows user to use the "underline" style (&n) in chat. |
nucleus.chat.url | ADMIN | Allows user to type clickable URLs in chat. |
nucleus.me.base | USER | Allows the user to run the command /me |
nucleus.me.exempt.cooldown | ADMIN | Allows the user to bypass the cooldown for /me |
nucleus.me.exempt.cost | ADMIN | Allows the user to bypass the cost for /me |
nucleus.me.exempt.warmup | ADMIN | Allows the user to bypass the warmup for /me |
# Some mods and plugins move the Minecraft player prefix to the main message body. If this is the case, turn this on, and Nucleus # will try to remove it. check-body-for-minecraft-prefix=false # The prefix to use when someone uses "/me". me-prefix="&7* {{displayName}} " # If "true", Nucleus will attempt to modify the chat modify-chat=true # If true, Nucleus will take the message and try to apply it's own transforms to it. This may overwrite other plugins who do processing super early, so turn this off if you are having problems. modify-main-message=true # If false, Nucleus will prepend it's prefixes/headers with those already set buy other plugins. If true, it will overwrite them. overwrite-early-prefixes=false # If false, Nucleus will prepend it's suffixes/footers with those already set buy other plugins. If true, it will overwrite them. overwrite-early-suffixes=false # If true, Nucleus will try to remove any text formatted in blue and underlined that Minecraft has tried to turn into a link. remove-link-underlines=true templates { # If true, Nucleus will select the most appropriate group template for a player when they send a chat message by checking all of the groups that a player has if the player does not have the "nucleus.chat.group" permission option set. If false, Nucleus will only look for the "nucleus.chat.group" option on players when they chat and will match that to the available group templates, if no match, Nucleus will apply the default template without checking actual permission groups. # # If your chat is lagging and you have group templates turned on, try setting this to false and giving your groups the appropriate "nucleus.chat.group" permission option. check-permission-groups=true # The default chat template if no group templates apply. default { # The default colour for a player's chat if the "chatcolour" permission option isn't set on the player or group. Takes the same input as the "namecolour" option set to "" to retain default behaviour (no change of colour). Do not include the "&" character. default-chatcolour="" # The default styles for a player's chat if the "chatstyle" permission option isn't set on the player or group. Takes the same input as the "chatstyle" option set to "" to retain default behaviour (no style). Do not include the "&" character. Multiple styles must be separated by commas. default-chatstyle="" # The default colour for a player's name if the "namecolour" permission option isn't set on the player or group. Takes the same input as the "chatcolour" option set to "" to retain default behaviour (no change of colour). Do not include the "&" character. default-namecolour="" # The default styles for a player's name if the "namestyle" permission option isn't set on the player or group. Takes the same input as the "namestyle" option, set to "" to retain default behaviour (no style). Do not include the "&" character. Multiple styles must be separated by commas. default-namestyle="" # Sets the prefix to a message. {{prefix}} - prefix (set as an option in a permission plugin), {{suffix}} - suffix (set as an option in a permission plugin), {{name}} - real name, {{displayname}} - display name prefix="{{prefix:s}}{{displayname}}{{suffix}}&f: " # Sets the suffix to a message. {{prefix}} - prefix (set as an option in a permission plugin), {{suffix}} - suffix (set as an option in a permission plugin), {{name}} - real name, {{displayname}} - display name suffix="" } # Group templates override the default chat template based on the users group. Note that the group name is case sensitive. # Weight matters, the player will use the highest weighted template in this list that matches a group they are in, including inherited groups. If the same weight is used on two or more entries, the group with the most parents will be used. group-templates { DefaultTemplate { # The default colour for a player's chat if the "chatcolour" permission option isn't set on the player or group. Takes the same input as the "namecolour" option set to "" to retain default behaviour (no change of colour). Do not include the "&" character. default-chatcolour="" # The default styles for a player's chat if the "chatstyle" permission option isn't set on the player or group. Takes the same input as the "chatstyle" option set to "" to retain default behaviour (no style). Do not include the "&" character. Multiple styles must be separated by commas. default-chatstyle="" # The default colour for a player's name if the "namecolour" permission option isn't set on the player or group. Takes the same input as the "chatcolour" option set to "" to retain default behaviour (no change of colour). Do not include the "&" character. default-namecolour="" # The default styles for a player's name if the "namestyle" permission option isn't set on the player or group. Takes the same input as the "namestyle" option, set to "" to retain default behaviour (no style). Do not include the "&" character. Multiple styles must be separated by commas. default-namestyle="" # Sets the prefix to a message. {{prefix}} - prefix (set as an option in a permission plugin), {{suffix}} - suffix (set as an option in a permission plugin), {{name}} - real name, {{displayname}} - display name prefix="{{prefix:s}}{{displayname}}{{suffix}}&f: " # Sets the suffix to a message. {{prefix}} - prefix (set as an option in a permission plugin), {{suffix}} - suffix (set as an option in a permission plugin), {{name}} - real name, {{displayname}} - display name suffix="" # The weight of the template. A higher number will take priority over lower numbers when two templates could apply to the same player because they are in the both groups. weight=1 } } # If "true", then Nucleus will select the most appropriate group template for a player when they send a chat message. If it's false # the default template will always be used, but there will be a performance gain because a player's groups not not have to be retrieved from the permission plugin. # Turn this off if you are getting severe performance problems when someone chats, it's usually due to a misbehaving permissions plugin. use-group-templates=true } # If true, Nucleus tries to remove the minecraft name prefix (<name>). try-to-remove-minecraft-prefix=true