Recolor the name above players head

Discussion in 'Plugin Development' started by orange451, Aug 2, 2012.

Thread Status:
Not open for further replies.
  1. Offline


        public void perform() {
            String name = ChatColor.RED + player.getName() + ChatColor.WHITE;
            CraftPlayer pl = (CraftPlayer)sender;
            setPlayerName(pl.getHandle(), pl.getName(), name);
        public void setPlayerName(EntityPlayer pl, String oldname, String newname) {
            WorldServer world = (WorldServer);
            EntityTracker tracker = world.tracker;
   = newname;
    What this did (in CraftBukkit for 1.2.5) is it recolored the name above my head to red (it worked really well, except it would remove my skin, for I actually became "&corange451")

    However, since the 1.3.1 update this no longer works. I am not saying the craftbukkit broke it, no, because this method always seemed very dodgy to me in the first place :)

    My question is this, what is a better way to take the name above my head, and add "" to the front of it?
  2. Offline

    chaseoes Retired Staff

Thread Status:
Not open for further replies.

Share This Page