Text & MiniMessage
PotatoMC utilizes a port of the Kyori Adventure text API, providing rich component-based chat and UI messaging, heavily relying on the MiniMessage format for human-readable string serialization.
1. MiniMessage Formatting
Instead of legacy section symbols (§), prefer MiniMessage tags for clean, hex-color-supported text generation.
use potato_api::text::Component;
let message = Component::from_mini_message(
"<gradient:#ffaa00:#ff5555><bold>WARNING:</bold></gradient> <gray>Server rebooting in <white>5</white> minutes.</gray>"
);
player.send_component(&message);2. Component Builder
You can also construct components programmatically using the fluent builder pattern.
let comp = Component::text("Click Here!")
.color(TextColor::from_hex("#00ff00"))
.decorate(TextDecoration::Bold)
.click_event(ClickEvent::run_command("/claim"))
.hover_event(HoverEvent::show_text(Component::text("Claim your daily reward!")));