Hi! I'm trying to get a scoreboard set up with teams but I can't get it to work. When I added it on a server there were no teams registered. The same thing happend when I added a health scoreboard, though with the health scoreboard my health was visible in the player list but there were no objectives registered. Does anyone know how to set up teams? Also, how can I add players into a team with a command like "/blue <player>". Thanks! Code:java public class Core extends JavaPlugin implements Listener{ @Overridepublic void onEnable() {getLogger().info("Team plugin enabled!");getServer().getPluginManager().registerEvents(this, this); //ScoreboardsScoreboardManager sbManager = Bukkit.getScoreboardManager();Scoreboard sBoard = sbManager.getNewScoreboard(); //TeamsTeam red = sBoard.registerNewTeam("red");Team blue = sBoard.registerNewTeam("blue"); //Colorred.setPrefix(ChatColor.RED + "");blue.setPrefix(ChatColor.BLUE + ""); //FriendlyFire (false)red.setAllowFriendlyFire(false);blue.setAllowFriendlyFire(false); blue.addPlayer(Bukkit.getOfflinePlayer("Vixelate")); //Health ScoreboardScoreboard pHealth = sbManager.getNewScoreboard();Objective health = pHealth.registerNewObjective("playerHealth", "health");health.setDisplaySlot(DisplaySlot.BELOW_NAME);health.setDisplaySlot(DisplaySlot.PLAYER_LIST);health.setDisplayName("Health"); for (Player player : Bukkit.getOnlinePlayers())player.setScoreboard(pHealth); }
Do you mean there are no Objectives registered if you do /scoreboard objectives list ? I think that's normal. I worked with the scoreboard several times and everything worked but it wasn't actually displayed in this "list" command.