-
Notifications
You must be signed in to change notification settings - Fork 8
Formats
Chat formats give your chat messages a proper look. They are found in the formats.yml file, saving space because you can use the same format multiple times in the plugin.
Each format is built of unlimited amount of parts. Which part represents a chunk of the message that is formatted, with the possibility of having different interactive elements on each part.
From a great explanation, see https://github.com/kangarko/ChatControl-Pro/issues/771
In each part, you can use all variables listed here.
There are many settings that can be given to a format's part, see below:
Info: What message shall be printed out to the chat?
Accepts: String
Message: '{pl_prefix}{player}{pl_suffix}&7: {message}'
Info: Makes the entire part only show if the sender of the message has the specified permission.
Accepts: String
Sender_Permission: 'my.custom.permission'
Info: Makes the entire part only show if a specific Javascript condition is met. Variables, including those from PlaceholderAPI are supported. See here for more information.
Condition: '"{player}" == "kangarko"'
Info: What happens when a mouse cursor goes over to this part?
Accepts: see below
The action represents what can happen. Possible values: SHOW_TEXT, SHOW_ACHIEVEMENT and SHOW_ITEM.
Messages, per line, to display.
Hover_Event:
Action: SHOW_TEXT
Values:
- "&6This player is VIP"
- "&6Check out &e/web &6to obtain VIP"
Info: What happens when a mouse cursor clicks on this part?
Accepts: see below
The action represents what can happen. Possible values: OPEN_URL, OPEN_FILE, RUN_COMMAND and SUGGEST_COMMAND.
Messages, per line, to display.
Click_Event:
Action: SUGGEST_COMMAND
Value: "/tell {player} "
Below is an example of an entire format named "Chat" with parts: "Vip", "Prefix", "Player", "Suffix" and "Message".
Chat:
#
# This is a part. That means, we split the message into as many parts
# as you'd like, giving each part different interactive properties.
#
# Options such as Sender_Permission or Hover_Event are not obligatory, you can remove
# them or add them at your will. For tutorial and all available options, see the link above.
#
Vip:
Message: "&6[VIP] "
Sender_Permission: "chatcontrol.groups.vip"
Hover_Event:
Action: SHOW_TEXT
Values:
- "&6This player is VIP"
- "&6Check out &e/web &6to obtain VIP"
Prefix:
Message: "&f{pl_prefix}"
Hover_Event:
Action: SHOW_TEXT
Values:
- "&8*-----* &f{player} &8*-----*"
- "&7Prefix&8: &7{pl_prefix}"
- "&7Group&8: &b{pl_group}"
Player:
Message: "{player}:"
Hover_Event:
Action: SHOW_TEXT
Values:
- "&7Message issued: &b{timestamp}"
- "&7Click to send a PM"
Click_Event:
Action: SUGGEST_COMMAND
Value: "/tell {player} "
The_Rest:
Message: "{pl_suffix} {message}"
© MineAcademy | Code Unique Minecraft Plugins & Servers In 20 Days
About
Free version
Basics
Understanding
- Channels
- Formatting
- Rules / Filters
- Handlers
- Groups
- JSON
- Discord
- Toggle ignoring swears
- Variables
- JavaScript Variables
Tweaking
Solving Issues
Miscellaneous