hey guys, i wanted to make a plugin that has two teams but the problem is that i don't know how to make the player's nametag that is in the team red for example red, i looked through all the websites but i didn't find a solution, i tried to use the TagAPI but it's last version is 1.7.9 and i am working with 1.10. pm : i saw a topic that shows how to do this but the skin changes to steve i don't want that to happen
@nightwolf111 The TagAPI page suggests what to do: https://dev.bukkit.org/bukkit-plugins/tag/#w-but-i-want-to-add-colors-to-usernames Hopefully this helps! - Rayzr
i didn't understand what you mean exactly i saw this page before they said that they won't update the TagAPI anymore and to search for another plugin but i didn't find anyone
You don't need the API. Make a scoreboard in your plugin. Then set teams. Have the player trying to join the team execute a command. Set the display to player list (Tab)
@nightwolf111 As @HeartandSoul said, make a scoreboard etc. I was pointing out that it says that even on the TagAPI page: https://dev.bukkit.org/bukkit-plugins/tag/#w-but-i-want-to-add-colors-to-usernames "I suggest finding a plugin that lets you do that using the built-in scoreboard system" EDIT: You don't even need a plugin. Just set up teams. On one little vanilla server of mine I had a team for each color, and so I just assigned my friends the color they wanted by doing /scoreboard teams join <color> <playername> or something like that.
@HeartandSoul so you mean i set the color of player in the tab list for example red and i set the displayname of the player is the playerlistcolor ? @Rayzr522 with mc commands you can do it i know that but i need with bukkitAPI cuz i am making a minigame and i need to know how to do it
This should help you out EDIT: I believe one of the options for teams is to set a team color. Just take a look at the JavaDocs.
i checked it but i didn't find any solution the team.optin can only set the player nametag visibility it can't set the color of the team ;_;
Yes, you create a scoreboard and set the color of the player. To do so, make a team first. It is spoonfeeding, but here is some code to help you get that working! Code: ScoreboardManager scoreboard = Bukkit.getServer().getScoreboardManager(); Scoreboard board = scoreboard.getNewScoreboard(); board.registerNewTeam("&6&lExampleTeam"); //stuff / logic This is just to register a team. Do other things with this. Keep in mind that it's an example and isn't intended to work, or if it's even right.
@HeartandSoul i already did that but it didn't change the color of the player's nametag it's just a name
Yeah. It's just registering a team. I Think this thread might help. https://bukkit.org/threads/1-5-scoreboards-change-player-nametag-color.134987/
i didn't understand it well :/ can you explane to me easier ? and i guessit's outdated cuz we are now in v 1.10 and it is still in 1.5
Ok, when you are making a new team in a scoreboard, there is a setPrefix method for it. it takes a string, supports chatcolors (ex: team.setPrefix(ChatColor.BLUE + ""); Edit: Tried to put 'B' in brackets in the string. Made it bold instead xD
@HeartandSoul i know that but i don't want to do the prefixe or suffix ialready know that it just makes a color near the playersname i want the players name to be colored