Chaton
Chaton is a plugin which allows server administrators to customize their chat.
You can change the join, leave and chat messages.
By default when you install it, it does nothing else than copying the vanilla behavior, but in the configuration,
you can change the behavior.
There is also a currupt option in the configuration if you want to make your chat a little
more realistic.
Configuration
In the configuration you have multiple sections, in the first one, you can change the join, leave and chat messages templates. You need to use the Minecraft JSON text format.
For example, letās analyze this template:
templates {
join {
arguments {
source {
optional = false
}
}
content {
# Here is the Minecraft JSON format, you should only modify this
# for the templates
color = aqua
text = "{source} "
extra = [{
# Sub text
color = yellow
text = "has joined the server!"
}]
}
options {
closeArg="}"
openArg="{"
}
}
}
The ā{source}ā placeholder represents the source which joined the server with prefixes.
If you donāt understand you can ask me.
In the second and third section, you can configure prefixes depending on permissions. Letās analyze this:
prefix {
builder = {
text = "[Builder] "
color = dark_blue
}
admin = {
text = "[Administrator] "
color = dark_blue
}
}
That means that the plugin will search if the player have the permission āchaton.prefixes.builderā, and the permission āchaton.prefixes.adminā, and it will concatenate all the prefixes the player have. For example, if the player has the two permissions, the message will be something like ā[Builder] [Administrator] Advancidā with colors instead of bold.
Then you can add some realism to your chat using the third option ācorruptā, you can enable it, set the maximum distance for hearing, and the minimum distance to start corrupting the message depending on the distance. You can also choose the character it will use.
There is also a section named enabled which allows you to enable or not a feature
by tweaking the feature to true/false.
The next section is for the source, it works the same way as the prefixed but you have ā{name}ā for the source display name. This can be useful for example with prefixes if you want the color to continue in your display name.
source {
builder {
arguments {
name {
optional = false
}
}
content {
color = blue
text = "{name}"
}
options {
closeArg="}"
openArg="{"
}
}
admin {
arguments {
name {
optional = false
}
}
content {
color = red
text = "{name}"
}
options {
closeArg="}"
openArg="{"
}
}
}
Other plugins
Currently Chaton works with PermissionsEX prefixes and suffixes, but you should directly
use the plugin prefixes and suffixes since itās more flexible. In PermissionEX, you canāt have multiple prefixes
depending on your groups.
Permissions
Here are the following plugin permissions which are self-explanatory:
- chaton.action.message: Allows the player to speak in the chat
- chaton.chat.colors: Allows the player to use colors in the chat using the ā&ā sign
- chaton.prefixes.*: Defines the player prefixes
- chaton.source.*: Defines the player source template
- chaton.bypass.corrupt: Disables the corrupt effect (only useful if it is enabled in the configuration)
If you have any suggestion or bug, please tell me on Github or on the forums.
Thank you!
This is my first Sponge plugin.