A minimalistic chat plugin.
- Adds Global/Local/Private Messages
- Adds the ability to modify the formatting of these messages.
- Has PAPI support.
Global/Local/Private Messages
The plugin adds support for 3 types of messages: Global, Local and Private.
- Global messages are visible to all players on the server.
- Local messages are only visible to players within the certain radius from the sender.
- Private messages are only visible to the specific player the sender specified.
If needed, local messages can be disabled by setting
Code (YAML):
enableLocal
: false
If local messages are enabled, all messages by default become local messages. To send a global message, the text of the message has to start with a specific prefix. By default, it's !. E.g.
Code (Text):
> Hello World!
[Local] Hello World!
> !Hello World!
[Global] Hello World!
To change the prefix for global messages, you need to change this setting
Code (YAML):
globalPrefix
:
"!"
To send a private message, you should use the command
Code (Text):
/msg MikChan Hello, MikChan!
Also, you can use this command to reply back to the last person who sent a message to you
Code (Text):
/r Hello Back!
Formatting
The plugin also lets you change how messages look by modifying these settings.
Code (YAML):
globalTemplate
: '<:player:> :message:'
localTemplate
: '<:player:> :message:'
privateTemplate
: '<:player_from
: to :player_to:> :message:'
consoleTemplate
: '<CONSOLE to :player_to:> :message:'
As you can notice, there are some unusual-looking placeholders.
- :player: is replaced with the sender name.
- :player_from: is replaced with the sender name. Works only in privateTemplate.
- :player_to: is replaced with the recipient name. Works only in privateTemplateand consoleTemplate.
- :message: is replaced with the text of the message.
If you wonder why consoleTemplate is needed: the private messages can be sent from the console, but since the console has no username, it has to be formatted separately.
Placeholder API (PAPI)
This plugin supports PAPI placeholders. There are few PAPI-specific settings in the config.
Code (YAML):
playerTemplate
: '
%player_name%'
fromTemplate
: '
%player_name%'
toTemplate
: '
%player_name%'
If PAPI is present
- :player: will be replaced with playerTemplate.
- :player_from: will be replaced with fromTemplate.
- :player_to: will be replaced with toTemplate.
If PAPI is not present in the plugin list, these settings will be simply ignored.