Solved Teams not registering on scoreboard

Discussion in 'Plugin Development' started by Rixterz, Dec 23, 2015.

Thread Status:
Not open for further replies.
  1. Offline



    I am supposedly registering a variety of teams to the scoreboard. However, when iterating through the scoreboard's teams, nothing is returned.

    My code, which I've simplified to the basics, is:
    Team tNullrMVP = board.registerNewTeam("tNullrMVP");
    tNullrMVP.setPrefix(ChatColor.AQUA + "");
    Team selectTeam = tNullrMVP;
    }catch(Exception e){
         p.sendMessage("error here");
    The try statement of course captures the NullReferenceException. Every time this code is run, "error here" is displayed. Can anyone see where I've gone wrong? I'm hoping my use of BungeeCord doesn't affect access to scoreboards.

  2. Offline


    @Rixterz The team probably already exists.

    Use board.getTeam(...), and if it is null then register the team.
  3. Offline


    Actually it turns out i was unregistering all teams elsewhere :/

    thanks for the reply though
Thread Status:
Not open for further replies.

Share This Page