Open svdragster opened 11 years ago
@svdragster
You need to use the addScoreboard() methods in Scoreboard to first add a new ScoreObjective to the scoreboard.
When you call ScoreObjective obj = sc.getScoreObjective("Something_that_definetly_exists."); it is returning a null object because it does not exist. it was never added.
After that when you do this:
sc.setScoreObjectivePostion(ScorePosition.SIDEBAR, obj, player.getWorld().getPlayerList().get(i)); // Does not work
it does not work because obj is null.
@somners I added the objective ingame via the scoreboard command. As mentioned the other method works perfectly, only the second one with Player does not make the sidebar appear.
This has been investigated more. This feature may have to be dropped unless we do a near rewrite of the scoreboards system.
alright, so implementing to work 'per player' in this manner would be improper. The method for updating every player still works. I'll be working on something relevant to this after the update to 1.7.2