-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration Files
RoseChat has several different configuration files that can be used to edit many different aspects of the plugin. Each config file has comments explaining the settings, but further information will be explained below.
The config file is used to edit most settings in the plugin. Please read the comments explaining each setting to understand what it does.
One section that is particularly useful is the chat-formats
section:
chat-formats:
# The format of a /message sent to another player.
# Default: {message-sent-sender}{message-sent-arrow}{message-sent-receiver}{message}
message-sent: '{message-sent-sender}{message-sent-arrow}{message-sent-receiver}{message}'
# The format of a /message received from another player.
# Default: {message-received-sender}{message-received-arrow}{message-received-receiver}{message}
message-received: '{message-received-sender}{message-received-arrow}{message-received-receiver}{message}'
# The format of a spied /message.
# Default: {spy-prefix}{spy-players}{message}
message-spy: '{spy-prefix}{spy-players}{message}'
# The format of a group message.
# Default: {group-prefix}{group-member-prefix}{player}{separator}{message}
group: '{group-prefix}{group-member-prefix}{player}{separator}{message}'
These are used by RoseChat to decide the format of the message that should be sent to the players. Each item surrounded by {}
are placeholders that are defined in placeholders.yml. These can be chained together to create a format perfect for you.
The channels file is used to define your own custom chat channels that can be used in-game. There are a few default channels to display how they work.
Option | Description | Example |
---|---|---|
default |
This sets the channel as the default channel. Players will be placed into this channel when they first join the server. There can only be one default channel. |
default: true |
format |
The format of the channel. The format is the same as formats in config.yml, and uses placeholders defined in the placeholders.yml file. |
format: '{prefix}{player}{separator}{message}' |
command |
This creates a command alias for the channel. Players can then use that command to join the channel. | command: staff |
radius |
The radius defines the distance that chat messages can be read from. If two players are over radius blocks away from each other, they will not be able to read the others' message. |
radius: 200 |
world |
The world that the player has to be in to send and receive messages. | world: skyblock |
auto-join |
If this is enabled, and combined with a world setting, when a player enters the world they will also join the channel. |
auto-join: true |
visible-anywhere |
If this is enabled, players in this channel will be able to see the message while they're using another channel. | visible-anywhere: true |
joinable |
If this is enabled, the channel can be joined with a command. Disable this to stop players using a command to join. This can be combined with visible-anywhere and world to only allow players to talk in the channel with a command, or when in a specific world. This is enabled by default. |
joinable: false |
discord |
The DiscordSRV channel that messages can be sent and received from. This needs to match a channel defined in DiscordSRV's config file. Requires DiscordSRV installed. |
discord: global |
servers |
This allows messages to be sent to the listed servers. This needs to match a server defined in bungeecord.yml. Requires BungeeCord. |
servers: - skyblock
|
The emojis file is used to define custom emojis. With a (Resource Pack)[https://github.com/Rosewood-Development/RoseChat/wiki/Resource-Packs] these can include custom images. This file is different to replacements.yml
as it has a font
option, which allows resource packs to handle what the emojis look like.
Option | Description | Example |
---|---|---|
text |
This is the text that the player will type before being replaced with an emoji. This can be anything. | text: :rosewood: |
replacement |
This is what the text will be replaced with. This can be anything. When using a resource pack, this should be a unicode number. |
replacement: "🌹" |
hover |
This is what will be shown when the player hovers over the emoji. This can be anything. This is optional. |
hover: &b&o:rosewood: |
font |
This is the font that will be used for the emoji. You can ignore this if not using a resource pack. | font: emoji |
The replacements file is used for replacing messages with other content. This can be used for fun, or to filter a message. For example, the default file replaces <3
with ❤️
. These are similar to emojis, but do not have a font
option. They have a regex
option which can be used to match replacements easier.
Option | Description | Example |
---|---|---|
text |
This is the text that the player will type before being replaced with an emoji. This can be anything. If regex is true, this should be the regex to match with. |
text: :rosewood: |
replacement |
This is what the text will be replaced with. This can be anything. | replacement: "{url}" |
regex |
This should be enabled if you want the replacement to match with regex. This is optional. |
regex: true |
The tags file can be used to create tags, these can tag specific players or add extra detail to messages.
Option | Description | Example |
---|---|---|
prefix |
The prefix used to start the tag. This means that the player will need to use this to start the tag, for example in the player tag, @Player is used to tag players. @ is the prefix. This is required. |
`prefix: '@' |
suffix |
This suffix is used to end the tag. This means that the player will need to use this to end the tag. For example, in the spoiler tag, message, </spoiler> is the suffix. |
suffix: </spoiler> |
tag-online-players |
If enabled, this will allow the tag to target players and replace names with nicknames. | tag-online-players: true |
match-length |
If enabled, this allows the replacement to be the same length as the message sent. This is useful as it can replace a 3 letter long word with 3 of the same character. |
match-length: true |
sound |
The sound that will be sent to the player who receives the tag. match-length must be enabled. Valid sounds can be viewed here. |
sound: BLOCK_NOTE_BLOCK_PLING |
format |
This is used the same as formats described earlier. The tag is replaced with this format. This is required. |
format: {player-tag} |
The placeholders file is used to define placeholders that RoseChat uses. This is probably the most useful file.
It allows you to define different hover and click events based on different conditions. These can then be put together in a format to display that content to the players. The {message}
placeholder is reserved for displaying messages, creating a placeholder called message
will not do anything.
A placeholder must first start with an ID, called player
in this instance. This can be anything.
player:
text:
default: "%player_nickname%"
hover:
default:
- "&7Username: &f%player_name%"
- "&7Click to Message"
click:
default:
action: SUGGEST_COMMAND
value: "/msg %player_name% "
The text
section tells the placeholder that text must be shown. This is required.
default
is required if no condition (explained below) is defined.
The hover
section tells the placeholder that a hover event should be shown. This is when a player hovers over the message. As hover events can have multiple lines, this is a list. This section is optional.
The click
section tells the placeholder that a click event should be shown. This is when a player clicks the message. Click events have (actions)[https://javadoc.io/doc/net.md-5/bungeecord-chat/latest/net/md_5/bungee/api/chat/ClickEvent.Action.html] that define what they do, and values which define what the content of the action. In this example, the value
will be shown in the player's text box when they click the message.
Placeholders can also have conditions. These bring futher customizability to them. Conditions are exactly what they sound like, a condition must be hit for a placeholder to be shown. However, in RoseChat you can also show something if a condition is not met.
prefix:
text:
condition: "%vault_rank%"
default: "&7"
admin: "&8[#C0FFEEAdmin&8] #C0FFEE"
hover:
condition: "%vault_rank%"
admin:
- "&cThis player administrates the server!"
This works similarly to the previous example, but using conditions to drive what is shown. In this instance the placeholder %vault_rank%
, provides by PlaceholderAPI, is the condition. If the rank is admin
, then the admin prefix will be shown and when hovered, the admin hover event will be shown. This works the same for click events.
Conditions can work in a variety of ways. This is an example of how conditions are formatted in RoseChat. Conditions can have operations in them, for example:
Condition | Definition | Example | Meaning |
---|---|---|---|
= |
Is equal to | %group_owner%=%player_name% |
If the group owner is the same as the player viewing the message, this will be true |
!= |
Is not equal to | %group_owner%!=%player_name% |
If the group owner is not the same as the player viewing the message, this will be true |
^ |
Contains | %vault_rank%^staff |
If the rank includes "staff", this will be true. |
If a condition returns a word (not a number or true/false value), this format can be used:
text:
condition: "%vault_rank%"
default: "&7"
vip: "&a"
vip+: "&2"
helper: "&9"
If the condition returns one of the values below it, that value will be used. If not, default
will be used.
If a condition returns a number, this format can be used:
text:
condition: "%playerpoints_points%"
value: 500
more: "&eYou're rich!"
equal: "&fYou've got exactly 500 points!"
less: "&7You should earn more money..."
If the condition (the amount of points that the player has) is more than the value, then more
will be used. If the condition is the same as the value, then equal
will be used. If the condition is less than the value, then less
will be used.
You do not need more
, equal
and less
if you do not plan on using them, having a default
value can work if you only need one.
If a condition returns true or false (or yes or no in PlaceholderAPI), this format can be used:
text:
condition: "%group_owner%=%player_name%"
default: ""
true: "&e:star:"
false: ""
If the condition is true, the true
value will be used. If the condition is false, the false
value can be used. If, for any reason, the placeholder cannot be parsed, then default
will be used. It may be easier to only include default
and true
if both default
and false
are the same.
RoseChat has some placeholders that do not require PlaceholderAPI.
Placeholder | Definition |
---|---|
%player_name% |
The name of the player who sent the message. |
%player_displayname% |
The display name of the player who sent the message. |
%player_nickname |
The nickname (from using /nick) of the player who sent the message. If a player does not have a nickname, then the display name will be used. If the player does not have a display name, then the name will be used. |
%group% |
If sent in a group, the ID of the group a message is sent in. |
%group_name% |
If sent in a group, the name of the group a message is sent in. |
%group_owner% |
If sent in a group, the name of the owner of a group a message is sent in. |
%channel% |
If sent in a channel, the name of the channel a message is sent in. |
Placeholders can also be prefixed with "other_" to get the person viewing the message, rather than the sender.
For example, %other_player_name%
gets the name of the viewer.