-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Setup
Once you have the CrewChat and Vault (optionally DiscordSRV) jar files in your server's plugins
directory, there are two permissions that need to be set to ensure proper functionality on the first boot of the server:
crewchat.default.active.global
crewchat.speak.global
The plugin generates a default configuration file (see below section), creating a single "global" channel. These permissions will allow any player that joins to be able to speak in this global channel, essentially just like vanilla chat functions.
Every permissions group must have a channel set as a "default active" channel. This is what tells the plugin what channel should be the player's active channel the first time they join the server. Failing to set a default active permission for a group will cause players in that group to be unable to speak in chat. Please watch out for group inheritance/parent groups, while this should not cause an issue, it does mean a player could inherit multiple default active permissions. The channel that ends up set as active on first join for these players may be unpredictable.
The "speak" permission is also required so players can actually send messages in a specified channel (namely global in this case).
By default, CrewChat has a single chat channel called global
. This name is not special in any way and can be used for anything you like.
The only permission needed for this default configuration to work is crewchat.chat.speak.global
.
The default configuration file looks like this for channels:
# Channel Configuration
# Define each channel here. Text colors can be either a named color or a hex code surrounded by quotes ("#ff2acb").
channels {
Global {
auto-subscribe=true
description="Global chat channel"
exclude-from-discord=false
show-channel-name-discord=false
show-channel-name-in-game=false
text-color="white"
}
}
Each channel is named by its configuration section. In this case, the name is Global
and will show in game as "Global". Channel names are not case sensitive which means global
, Global
, GLOBAL
and GlObAl
will all work for in game commands. The channel name will always be displayed with the formatting given in the configuration.
Chat color refers to the color messages will appear in chat for that channel. Your choices are the 16 legacy chat colors (referenced by name) or a hexadecimal color (ex. #FA24B9
). Hex colors must have the #
prepended to be valid.
auto-subscribe
specifies that new players will automatically be subscribed to this channel when their player data is created. You'll want to have at least one channel with this set to true
so when new players join, they have a chat channel to see.
exclude-from-discord
specifies whether this channel will have its chat messages sent to a Discord channel.
show-channel-name-discord
specifies whether messages sent in game will have the channel name prepended on Discord.
show-channel-name-in-game
specifies whether messages sent in game will have the channel name prepended in game.
You can specify as many channels as you like, there is no limit.
For the example above, the only permission needed for players to be able to use the global
channel like a normal chat is:
crewchat.crewchat.speak.global
This means it is possible to allow players to view a channel without being able to talk themselves.
From there, you can choose permissions to allow players to subscribe (crewchat.chat.subscribe.global
)/unsubscribe (crewchat.hat.unsubscribe.global
) to the channel, meaning they would be able to see or not see the messages sent in that channel. There is also a separate permission to allow a player to set a channel as their active channel (crewchat.chat.active.global
), in other words, the channel their messages are sent to.
If you want a player to be able to view a channel but not speak in it, just give subscribe/unsubscribe permissions.
If you want a player to be able to speak in a channel, but not be able to subscribe/unsubscribe, just give speak permission (and active permission if more than one channel exists).
For information on linking channels with Discord, please see DiscordSRV Integration.