Is it possible to remove a players nametag without putting an entity on him? If so can someone point me in the right direction of doing it, it doesn't matter if it uses NMS ? Thanks. (The reason I don't to put an entity on his head is because they wont be able to teleport for some reason, you could also help me solve that if their is no other way )
Use scoreboard teams: Code (Text): Team teams = sco.registerNewTeam("Stuff"); teams.setNameTagVisibility(NameTagVisibility.NEVER);
It still shows the nametag, debug code: Code (Text): @EventHandler public void onJoin(PlayerJoinEvent event) { refreshNameTag(event.getPlayer()); teams.addPlayer(event.getPlayer()); System.out.println(teams.getNameTagVisibility()); if (teams.getPlayers().contains(event.getPlayer())) { System.out.println("team contains player!"); } } Outcome in console: Any other solutions? @avighnash do you need the full code if you think im doing something wrong? Edit: BTW refresh nametag has nothing to do with the team
Try Code (Text): Team team = sco.registerNewTeam("erer"); team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OTHER_TEAMS); team.setNameTagVisibility(NameTagVisibility.HIDE_FOR_OWN_TEAM);
Should work I think. Code (Text): Scoreboard sb = ...; Team team = sb.registerNewTeam("match"); team.setOption(Option.NAME_TAG_VISIBILITY, Team.OptionStatus.NEVER); player.setScoreboard(sb); team.addEntry(player.getName());