1
Bukkit plugin:title help
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 ?
-Tnx
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
Create an account or sign in to comment.
3
1
Try this out:
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e){
Player p = e.getPlayer();
p.sendTitle("Top Text", "Bottom Text");
}
1
Yeah but i'm going to run my server with custom plugins
1
Hey! I found a plugin that already does this. You can customize the join message. Let me know if this works for you! https://www.spigotmc.org/resources/titl ... sage.2173/