[Please Help] Scoreboard per World!

Discussion in 'Plugin Development' started by zDubsCrazy, May 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    I'm finishing my plugin, and I need just one more thing: the Scoreboard.
    I can make a Scoreboard, but what I'm doing is working wrong, showing
    This should not and in the wrong order. I need a Scoreboard with these features:

    * For worlds (if the player has world1, he has a scoreboard, if world2 a different one).
    * Show the players of each world (names and height Y). Example: the players of the world 1 has the following Scoreboard: "Players Height"
    "Player1 10"
    "Player2 5"

    * It has to be only in the worlds I want (3), and it has to be updated, according to the player switches high. Exempo: - Player1 down 3 blocks:
    "Players Height"
    "Player1 7"
    "Player2 5"

    I'm not asking for code but help!

    Thank you.
  2. Offline


    It's hard to help without code, but I give it a try.

    If you create the Scoreboard for every world apart, you then just need to have a for loop with all the players check in what world they are and then give them the write Scoreboard.

    If you Google on "bukkit scoreboard" you can find some good help with setting the scores.

    Note: save the strings of what the scores are of each scoreboard and reset them before you set the score again, because the height of the players will change and if you don't reset the old scores then you will get a big scoreboard(height max is 15) and people will be kicked/disconnected because of the big scoreboard.
  3. Offline


    Just create the scoreboards and then show them to Players if they are in the same world??

    1. Scoreboard board; //Already defined, just to show variable.
    3. for(Player p : Bukkit.getOnlinePlayers){
    4. if(p.getWorld == <Scoreboard World>){
    5. p.setScoreboard(board);
    6. }
    7. }
Thread Status:
Not open for further replies.

Share This Page