View difference between Paste ID: CCzbWCs5 and ew60ss5N
SHOW: | | - or go back to the newest paste.
1
	    ScoreboardManager manager = Bukkit.getServer().getScoreboardManager();
2-
	    Scoreboard board = manager.getNewScoreboard();
2+
	    Scoreboard board = manager.getMainScoreboard();
3
	     
4
	    Objective objective = board.registerNewObjective("money", "dummy");
5
	    objective.setDisplaySlot(DisplaySlot.BELOW_NAME);
6
	    objective.setDisplayName("Money");
7
	     
8
	    for(Player online : Bukkit.getOnlinePlayers()){
9
		    Score score = objective.getScore(online);
10
		    score.setScore(42);
11-
		    online.setScoreboard(board);
11+