HomeJavaModsBukkitText Library
BukkitText Library
Version 0.3 fixes some class names from Version 1. I created this library for those who do not know how to utilise the new Craftbukkit/Spigot Title and Action bar text functions. The library is licenced under "BSD".

Examples:

Send player title on join:
Code (Text):
private BukkitText text = new BukkitText();

@Eventhandler
public void onJoin(PlayerJoinEvent e) {

Player player = e.getPlayer();

String title = "&cWelcome &b" + player.getName() + " &cto the server!"
String subtitle = "&4Enjoy your stay!"

// all times are in ticks, as a heads up
int fadeIn = 20;
int viewTime = 60;
int fadeOut = 20;

text.sendTitleText(subtitle, title, player, fadeIn, viewTime, fadeOut);
}
Send player action bar text if they break diamond ore:
Code (Text):
private BukkitText text = new BukkitText();

@EventHandler
public void onBlockBreak(BlockBreakEvent e) {
Player player = e.getPlayer();

String message = "&6Congrats! You just mined &bDiamond ore&6!";

if(e.getBlock().getType() == Material.DIAMOND_ORE) {
text.sendActionBarText(message, player);
}
}
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

BukkitText Library is a free Minecraft Java mod. Downloaded 289 times (via Spigot). Download it and open it directly in the game.

Explore more