Skip to content

Configuration

mattboy9921 edited this page Aug 8, 2022 · 2 revisions

Default Config

The main configuration file for the plugin is config.conf, found in the CrewChat folder inside your server's plugin folder, and uses a HOCON format. This format is very similar to YAML, but features more clear syntax and is designed to be "Human Optimized".

In most cases, you likely will not be writing portions of configuration, instead, just changing some values.

Aside from the configuration section, the other values are:

# Allow color codes/MiniMessage tags in chat globally.
allow-color=false
#
# Enable DiscordSRV integration.
enable-discordsrv=false
# 
# Time parties exist with nobody in them (in minutes).
party-timeout=10
# 
# Show channel names on Discord to in game messages.
show-discord-channel-name-in-game=false

They are pretty self explanatory. The way they are listed above is their default values.

Channels

Also in config.conf, is the channels configuration. This is where you will define your channels. Please review Initial Setup for a guide on setting up your first channel.

Each channel gets its own set of curly braces ({}) following the name. Remember that the formatting of the name in the config is how it will show in game, but the names are not case sensitive for commands.

Messages

CrewChat has a second configuration file called messages.conf. This file contains every string a user might see in the plugin and allows you to fully customize every aspect of how messages look and read out. Every field features a comment above it explaining what the message is for, if it accepts any tags and whether colors are supported.

Every string in this file makes use of MiniMessage tags to delineate color and style. These function very much like XML or HTML tags.

Colors and Style

Colors are written in one of two ways:

  • As a named color from the original 16 chat colors - <red>, <dark_blue>
  • As a hexadecimal color string, prepended by a # - <#AA0F35>, <#F3013D>

Formatting can be one of:

  • <bold>
  • <italics>
  • <underline>
  • <strikethrough>
  • <obfuscated>

There is also <reset> which will reset all color and style in a given string.

Also note, any above tag except <reset> also has an accompanying closing tag - </red>, </#AA0F35>, </bold>. These are needed to stop a color or style from appearing on text you don't want it to appear on.

Replacement Tags

In addition to color and style tags, many messages include variable data such as player names, channel names, status strings, etc. To allow for these variables in strings, there are tags in these strings that are replaced with the appropriate value at runtime.

Examples of these tags are:

  • <player_name>
  • <channel_name>
  • <time_remaining>
  • <hex_color>

These tags must be spelled exactly as they are shown in the comment above the string, otherwise they are not parsed and will show in plain text at runtime. Also note that each tag is optional. You can choose to omit them if you prefer.

More information on MiniMessage can be found here.

Player Data

There is a third file generated by CrewChat called playerdata.conf. Unlike the other two files, which you are free to edit as you like, this one is essentially flat file storage for the data saved for each player that joins. This file is generated and updated by the plugin. The only reason to manually edit something is in the event of corrupted/bad data.

Clone this wiki locally