Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Double NameTags

Comments in 'Plugin Development' started by vertx, Dec 6, 2015.

  1. vertx
    Offline

    vertx Active Member

    Joined:
    Dec 4, 2014
    Posts:
    61
    Minecraft User:
    Vertx
    Well, i'm for a while trying to make double nametags... one line, showing the player name, another, the player health or something more,

    Well, the first issue is that is not possible to do this with line breaks, both PHP_EOL and \n (the same thing) output this:

    Screenshot_2015-12-06-12-46-22.png

    As you can see, there are two lines, but:

    1- it's not centred
    2- PHP_EOL or \n turns into "ú"
    3- the bold tag declared on first line goes to the second too, and there's no way to remove that

    So this is not what is used on Hypixel for example, because they sucessfully removed the bold format from second line, and it's centred, and i didn't found on MiNET API anything related to this, so this seems to be another thing rather than Player->setNameTag();

    the desired effect is like that:

    pYaC59y.png

    Made using ScoreboardPacket from minecraft pc, and Hypixel got the exact same effect on they pocket edition server, so what's the mistery here?

    Have mcpe a packet for that or this can be featured by custom nbt tags? If yes, how?

    Thanks
    Last edited: Dec 6, 2015
    CraftYourBukkit likes this.
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    And if you want it centered, just pit a bunch of spaces.
    You should use TextFormat::RESET if you don't want the bold effect to carry onto the second line. And for centering just put spaces before the text, that way the spaces wil be pushed to the center.
    PEMapModder, HotFireyDeath and vertx like this.
  3. vertx
    Offline

    vertx Active Member

    Joined:
    Dec 4, 2014
    Posts:
    61
    Minecraft User:
    Vertx
    TextFormat::RESET did the trick

    Screenshot_2015-12-06-14-23-34.png

    Thanks!

Share This Page

Advertisement