💬Messages and Formatting
Plugin messages are stored and configured in the messages.yml file. This allows for easy customization of all text displayed by the plugin.
All YAML text files must be valid for the plugin to work, so check for errors in your changes at https://jsonformatter.org/yaml-validator
Key Features:
Placeholders: You can use both internal CrownPunishments placeholders and PlaceholderAPI placeholders in messages to display dynamic information.
Color Codes: CrownPunishments supports both legacy color codes (& codes like &a, &c, etc.) and modern RGB hex color codes (#RRGGBB).
YAML Structure: Messages are organized in a hierarchical YAML structure, making them easy to find and modify.
Example from messages.yml:
messages:
plugin_enabled: '{prefix}&dPlugin enabled.'
no_permission: '{prefix}&cYou do not have permission to use this command.'
punishment_confirmed: '{prefix}&aPlayer &b{target}&a has been {punishment_type}d for &b{time}&a with reason: &b{reason}'
you_are_frozen: | # Multiline message using YAML's literal block scalar
&c&lYou are FROZEN!
&cYou have been frozen by a moderator for review.
&cPlease remain in place and await further instructions.
&7Admins can still see your chat messages.
RGB Color Code Example:
prefix: "#ff801a&lᴄʀᴏᴡɴ &6🜲&r " # Plugin prefix using RGB hex code for orange
plugin_enabled: '{prefix}#aaffaa&lPlugin enabled with RGB colors!' # Message using RGB hex code for light green
Last updated