Welcome to the new docs site for Nucleus v2! Still on Nucleus v1? Visit the old site here.

Chat Module

Some mods or plugins may conflict with this module

The highest rating mod/plugin compatibility issue is rated critical. See the compatibility tab for more information.

Introduction

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.

Configuration

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.

Group Templates

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}}"
        }
    }
}

Player Prefixes and Suffixes

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):

Loading...

Custom Prefixes

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):

Loading...

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.

Player Messages: Colours, Formats and Magic

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.

Player Messages: URLs

URLs are detected by Nucleus and are made clickable. This requires the nucleus.chat.url permission.

Default Name Colours

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):

Loading...

Default Chat Colours

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):

Loading...

Default Chat Styles

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:

Loading...

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.

  • Critical issues are where some function of Nucleus is seriously affected in a way server owners are not expecting and have no known workaround, other than removing the plugin in question. It is advised that server owners remove the plugin in question and find an alternative if they wish to use the Nucleus feature it affects.
  • Major issues are where some function of Nucleus is seriously affected in a way server owners are not expecting by default but a workaround exists to mitigate or fix the issue.
  • Minor issues are where some function of Nucleus can be mildy affected, possibly in an unwanted way, but is not enabled by default or has little impact on day to day server running and management. A workaround exists to restore or use the affected Nucleus functionality.
  • Info issues are really non-issues. Incompatibilities with this label tend to be wanted (such as a world management plugin taking over the `/world` command), and are documented here for completeness, along with how to restore or use Nucleus functions.
Mod/Plugin: Simple Tags. Affected Module(s): chat.

Chat prefixes are not shown when using Simple Tags

Critical

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.

Mod/Plugin: FTB Utilities. Affected Module(s): chat.

Chat prefixes and formatting are not shown when using FTB Utilities

Major

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".

/me
Module: chat
Formats the next chat message as an action, using the format set by the server.

Aliases: /me, /action

Usage: /me <message…>

Default Role: user

Basic Command Permission: nucleus.me.base

Permissions

  • nucleus.me.exempt.cost - Default Role: admin
    Allows the user to bypass the cost for /me
  • nucleus.me.base - Default Role: user
    Allows the user to run the command /me
  • nucleus.me.exempt.cooldown - Default Role: admin
    Allows the user to bypass the cooldown for /me
  • nucleus.me.exempt.warmup - Default Role: admin
    Allows the user to bypass the warmup for /me

This command is an equivalent to the following command(s) in Essentials: /me, /action, /describe

Permission Suggested Role Description
nucleus.chat.magic admin Allows user to use magic characters 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
The following configuration is the default for this module:
                            # 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 {
    # 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=""
        }
    }
    # If "true", then Nucleus will select the a group template for a player when they send a chat message, based on what isreturned by the "nucleus.chat.group" permission option. If it's false the default template will always be used.
    use-group-templates=true
}
# If true, Nucleus tries to remove the minecraft name prefix (<name>).
try-to-remove-minecraft-prefix=true

                        
Search

Downloading search database, this won't take long...