-
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.
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: 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 a format named "Chat" with parts: "Vip", "Prefix", "Player", "Suffix" and "Message".
Chat:
Vip:
Message: "&6[VIP] "
Permission: "chatcontrol.groups.vip"
Hover_Event:
Action: SHOW_TEXT
Values:
- "&6This player is VIP"
- "&6Check out &e/web &6to obtain VIP"
Prefix:
Message: "{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} "
Suffix:
Message: "{pl_suffix} "
Message:
Message: "{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