I'm trying to add a Prefix to a Scoreboard team but it seems that it won't work for some reason and I have no clue why. This is the code I'm using Code (Move your mouse to reveal the content) Code (open) Code (close) Code: Scoreboard sc = Bukkit.getScoreboardManager().getMainScoreboard(); Team team1 = sc.getTeam("Owner"); if(team1 == null) { team1 = sc.registerNewTeam("Owner"); } team1.setPrefix(ChatColor.translateAlternateColorCodes('&', "&a[Prefix]")); team1.addPlayer(p.getPlayer()); p.sendMessage("§7§oYour rank has been undated to §bOwner"); and this is how it looks like ingame Image (Move your mouse to reveal the content) Image (open) Image (close)
Whats the rest of the event/whatever. I cant see the message "your rank...". Do you receive that message? Or where is your piece of code from?
@MightyOne This is the code from my onJoin Code: if (p.hasPermission("skyline.owner")) { Scoreboard sc = Bukkit.getScoreboardManager().getMainScoreboard(); Team team1 = sc.getTeam("Owner"); if(team1 == null) { team1 = sc.registerNewTeam("Owner"); } team1.setPrefix(ChatColor.translateAlternateColorCodes('&', "&a[Prefix]")); team1.addPlayer(p.getPlayer()); p.sendMessage("§7§oYour rank has been undated to §bOwner"); } else if (p.hasPermission("skyline.admin")) { p.setPlayerListName("§8(§6Admin§8)§7 " + p.getName()); p.sendMessage("§7§oYour rank has been undated to §bAdmin"); } else if (p.hasPermission("skyline.cm")) { p.setPlayerListName("§8(§3Cast Member§8)§7 " + p.getName()); p.sendMessage("§7§oYour rank has been undated to §bCM"); } else if (p.hasPermission("skyline.cp")) { p.setPlayerListName("§8(§bIntern§8)§7 " + p.getName()); p.sendMessage("§7§oYour rank has been undated to §bCP"); } else if (p.hasPermission("skyline.beta")) { p.setPlayerListName("§8(§bBeta§8)§7 " + p.getName()); p.sendMessage("§7§oYour rank has been undated to §bBeta"); } else { p.setPlayerListName("§7" + p.getName()); p.sendMessage("§7§oYour rank has been undated to §bGuest"); }