[SOLVED] Team Prefix's Not Showing Up

Discussion in 'Spigot Plugin Development' started by MrChrisdamonster, Jun 18, 2015.

  1. Hello everyone!

    Recently I ran into a slight problem. None of my team prefix's are showing up for ranks. Does anyone know why this is happening? Code:

    Code (Text):
    public void playerRankCattleTeam(Player p)
        {
            ScoreboardManager manager = Bukkit.getScoreboardManager();
            Scoreboard board = manager.getNewScoreboard();
            Team cattle = board.registerNewTeam("Cattle");
            cattle.addPlayer(p);
            cattle.setPrefix(ChatColor.WHITE + "[Cattle] ");
            cattle.setNameTagVisibility(NameTagVisibility.ALWAYS);
        }
    Code (Text):
    public void playerRankCattle(Player p)
        {
            playerObject.playerRankCattleTeam(p);
            p.setAllowFlight(false);
            p.setLevel(3);
            p.setGameMode(GameMode.SURVIVAL);
            p.setOp(false);
        }
    Code (Text):
    if(args[1].equalsIgnoreCase("cattle"))
                {
                    rankSubCommand.playerRankCattle(target);
                    p.sendMessage(ChatColor.RED + "> " + ChatColor.AQUA + "You have set " + target.getName() + "'s rank to Cattle!");
                }
     
  2. 1. any errors in console
    2. try setting the scoreboard for the player
    3. wwhere is the prefix supposed to show
    4. If you have already set the scoreboard for the player then you should have included that code in the thread
     
  3. Whoops, didn't set the scoreboard for the player. Thanks!