-
Notifications
You must be signed in to change notification settings - Fork 0
ChatUtil
Larrox edited this page Aug 29, 2025
·
1 revision
The ChatUtil class in LarroxUtilsAPI is a comprehensive utility for sending colored and formatted messages to players or the console.
It supports standard chat messages, titles, subtitles, action bars, and even hex color codes.
Note
Don’t forget to import:
import dev.larrox.ChatUtil;- Convert
&color codes to Bukkit colors. - Send messages to players or CommandSender (console + players).
- Send titles and subtitles with fade-in/out timings.
- Send messages to the Action Bar (above the hotbar).
- Process hex color codes for modern Minecraft versions.
ChatUtil.send(player, "&aHello, &bPlayer!");
ChatUtil.send(sender, "&cYou don’t have permission!");ChatUtil.sendTitle(player, "&6Welcome!", "&7Enjoy your stay!", 10, 70, 20);ChatUtil.sendTitle(player, "&cDanger!", 10, 40, 10);ChatUtil.sendSubtitle(player, "&eYou have new messages!", 10, 50, 10);ChatUtil.sendActionBar(player, "&bYou gained 5 XP!");ChatUtil chatUtil = new ChatUtil();
String message = chatUtil.hexColor("&#FF0000Red & Hex &6Gold");
player.sendMessage(message);- Use
ChatUtil.send()for normal chat messages. - Use
sendTitleandsendSubtitlefor important visual notifications. - Use
sendActionBarfor temporary info like cooldowns or XP gains. - Use
hexColor()for modern RGB color support in Minecraft 1.16+. - Always replace
&with color codes or usehexColorfor advanced colors.