# Bukkit send a custom placed name plate?

Hello i have been working on a part of my plugin that has waypoints allowing the user to create delete etc. I got to thinking after using and seeing a couple of the disguse plugins. That maybe i could create a command toggle that would show the user where the waypoints they have are! I know how to do all of this i just have no idea how to display a nameplate to the client. I know its possible because disguisecraft does it i tried looking though their code but couldent find much...

I belive to get this effect i need to send packets to the client if someone can direct me to a list of bukkit packets or even a solution to sending the client a custom located nameplate that would be fantastic! Thanks in advanced.

I'm not exactly sure what you mean about a custom nameplate, but DisguiseCraft (which I'm a developer of) uses Bukkit's display name function. We merely used player.setDisplayerName("NewName") so that players appeared to have the new names and could talk in the chat with them.

• Oh that makes sense thank you... Anyways i was looking for something similar to this that i could tell where it is placed like a x y z coord Apr 17 '12 at 11:59

Yes, DisguiseCraft uses packets to change the name of a player or remove the name tag. The 'player.setDisplayName' function only changes the name that will appear in chat, not the nameplate above the player entity. I'm not entirely sure what the code would look like, but from what I understand you want actual floating name tags with the name of the waypoint. My idea would be to spawn named entities, making them invisible somehow, and making them not move from the waypoint location. You could also change the color of the nameplate to make it easier for players to distinguish from a normal player name tag and a waypoint.

• That doesn't answer the question though.
– Anko
Dec 9 '12 at 1:08

It's technically not possible to hide the nameplates without hiding the person, changing nameplates requires skin changes as it sends packets to fool the client into believing another player is where the real player is. UNLESS you hook into something like the spoutcraft API or another client-side mod.

Alright first of all:

player.setDisplayerName("NewName")


Where would you put it at in the first place, it's not going to be:

public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
Player player = (Player) sender;


Maybe:

}if(args.length == 0){
player.setDisplayerName(ChatColor.BLUE + player.getName());


And basically keep doing the args until it's enough:

 args[0] + " " + args[1] + " " + args[2] + " " + args[3] + " " + args[4] + " " + args[5] + " " + args[6] + " " + args[7] + " " + args[8] + " " + args[9] + " " + args[10] + " " + args[11] + " " + args[12] + " " + args[13] + " " + args[14] + " " + args[15]);

• i don't really understand what you are saying here? May 15 '12 at 17:55