Configuring Messages
The messages section lets you define the texts effects that are sent to players when they perform certain actions (such as executing commands, consuming heart items, or when errors occur). You can combine multiple components such as chat messages, action bar messages, titles, subtitles, sounds, and particles.
Messages have the MiniMessage format for components like chat, action bar, title, and subtitle. This format allows you to use colors, gradients, and even hover events within your messages. In addition, you can also use various placeholders to insert dynamic content such as player names, heart counts, dates, and more.
Make sure to check it out to see usage examples.
Message Components
Each message entry can be defined either as a single string or as an object containing several properties. The following components are available:
message
The chat message is sent to the player.action bar
A message displayed above the player's hotbar.title
andsubtitle
Full-screen messages that appear in the center of the screen.You can also define their display times using the
title times
property:fade in
: Duration (in ticks) for the title to fade in.stay
: Duration (in ticks) for the title to remain on screen.fade out
: Duration (in ticks) for the title to fade out.
sound
Plays a sound to the player. This can be defined either as a simple string (using the sound key) or as an object where you can customize the volume and pitch:key
: The sound identifier (for example,minecraft:entity.player.levelup
).volume
: A numeric value to set the volume.pitch
: A numeric value to set the pitch.
particle
Displays particle effects around the player. This can be defined either as a simple string (using the particle type) or as an object:type
: The particle type (refer to the Bukkit Particle Documentation for a list of available particles).count
: The number of particles to spawn.offset x
,offset y
,offset z
: Maximum random offsets along each axis from the player’s eye location.extra
: Sets the particle extra data. Varies by particle type.
Example Configurations
Below are some example message definitions extracted from the configuration:
Simple Chat Message
command hearts set success: "<green>Set <white><target><green>'s hearts to <white><new><heart><green> (old: <white><previous><heart><green>)."
This sends a simple chat message to the player using MiniMessage formatting. It also utilizes placeholders such as <target>
, <new>
, and <previous>
.
Combined Chat and Sound
command hearts add success:
message: "<green>Added <white><added><green><heart> to <white><target><green> (new: <white><new><heart><green>, old: <white><previous><heart><green>)."
sound:
key: minecraft:entity.player.levelup
volume: 0.5
pitch: 0.2
This examples demonstrates a chat message and a sound being played to the player with custom volume and pitch settings.
Title with Custom Times
command hearts set success target:
title: "<green>Success!"
subtitle: "<blue>Your hearts have been updated."
title times:
fade in: 10
stay: 20
fade out: 10
This configuration sends a title and subtitle to the player with defined fade in, stay, and fade out durations.
Action Bar and Particle Effects
consume heart success:
action bar: "<white>+<amount><heart>"
sound: minecraft:entity.player.levelup
particle:
type: "HEART"
count: 10
offset x: 0.5
offset y: 1
offset z: 0.5
Here, when a heart is consumed successfully, the player receives an action bar message, a level-up sound is played, and heart particles are spawned around them.
More Examples
You can check out the default messages in config.yml to see more examples.
Additional Placeholders
<heart>
: Displays a heart symbol (❤) with color(255, 0, 0)
.
Using PlaceholderAPI Placeholders
message example: "You are player with UUID '<papi:player_uuid>'."
This message uses a PlaceholderAPI placeholder (%player_uuid%
) to display the player's UUID.
WARNING
PlaceholderAPI must be installed for this to work.