1

Bukkit plugin HELP

pieterx12's Avatar pieterx1211/11/15 8:28 am
1 emeralds 62
Hey guys
I wanna to program a plugin for loginmessages but the title that needs to show up doesn't want to work can someone help me ?
public void onDisable() {
PluginDescriptionFile pdfFile = getDescription();
Logger logger = Logger.getLogger("Minecraft");

logger.info(pdfFile.getName() + " has been disabled (V." + pdfFile.getVersion() + ")");
}

@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();

PacketPlayOutTitle welcomeTitle = new PacketPlayOutTitle(EnumTitleAction.TITLE,
ChatSerializer.a("/title @a title[{text:'WELCOME',color:'gold'"), 20, 40, 30);

PlayerConnection connection = ((CraftPlayer)p).getHandle().playerConnection;
connection.sendPacket(welcomeTitle);

p.sendMessage("Welcome!");
}
}

-Tnx
Posted by pieterx12's Avatar
pieterx12
Level 8 : Apprentice Miner
1

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome