Hello, Developers! Today I tried to make a Scoreboard on PlayerJoinEvent, but it doesn't work. Code (Text): public void gameListScoreboard(PlayerJoinEvent event) { ScoreboardManager manager = Bukkit.getScoreboardManager(); Scoreboard gamelist = manager.getNewScoreboard(); Objective list = gamelist.registerNewObjective("gamelist", "dummy"); list.setDisplaySlot(DisplaySlot.SIDEBAR); list.setDisplayName("Servers"); event.getPlayer().setScoreboard(gamelist); } Does someone know why it doesn't display? It doesn't give error in console or anything.
You need to add a tick delay. You can't set directly on join. You have to schedule a tick before setting it.
http://bukkit.gamepedia.com/Scheduler_Programming There is also something called google and youtube. They contain alot of tutorials...
Ah, so you mean when I join the server I have to add a 3 ticks delay to the register scoreboard function (in the code)