In the game, above an avatars head is the players name. Is there a method available to edit this text (I would like to add a "rank" there too)?
I've had a look and I can't see anything in the API? I may be going blind though!
In the game, above an avatars head is the players name. Is there a method available to edit this text (I would like to add a "rank" there too)?
I've had a look and I can't see anything in the API? I may be going blind though!
In the game, above an avatars head is the players name. Is there a method available to edit this text (I would like to add a "rank" there too)?
I've had a look and I can't see anything in the API? I may be going blind though!
you could use 3d text and update the location as the player moves, but i myself don't even like any text above players oO i think a better way would be to have the players info displayed in a info box off to the the side of the screen and only display when you point the crosshair at the player
you could add a permission group for each rank and then switch them whenever you need to, they could all have the same exact permission but a different name thus rendering them purely visual and reflecting what you want instead of actually being different permission groups.
Use the player.setPermissionGroup() method to change them where something that you are monitoring through your plugin happens. (If I remember correctly you are monitoring survival time on your server right?)
Then you can use these permissions to set up your name tags:
shownametag | Determines if the nametag of this player should be visible | true | |
nametagcolor | Color of the player's nametag | [#FFFFFF] | |
nametagprefix | Prefix for the player's nametag | ||
nametagsuffix | Suffix for the player's nametag | ||
nametagprefixcolor | Color for the nametag prefix | [#FFFFFF] | |
nametagsuffixcolor | Color for the nametag suffix | [#FFFFFF] |
Thanks guys. I like both of these suggestions. I'll take a look at each in turn and see which one works best for me. Cheers!
Don’t have an account yet? Create a new account now and be part of our community!