Leaderboard issues

Discussion in 'Plugin Development' started by iAmGuus, Apr 25, 2015.

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

    iAmGuus

    Hey guys,

    So, I was making this leaderbord for a minigame and wanted to create a leaderboard for players with most wins.

    I was busy developing and tried it, but somehow didn't work. Searched on Google, but still had no clue.

    Code: http://pastebin.com/wsyw4kMJ

    I use a timer to repeat this method every minute.

    I have already used debug messages, and the only debug message that is being printed out, is "done all1" but the signs aren't set either.

    Any idea?

    Thanks in advance,
    iAmGuus
     
  2. Offline

    MC_Suger

    You have to update the signs, use sign.update(true);
     
  3. Maybe for the signs, call the update method in the sign class for the instances you have. And for the blocks. maybe do like an else statement that checks if the block aren't skulls, and set the blocks, and then run that if statement again
     
  4. Offline

    iAmGuus

    @Bram0101 I set the skulls ingame already, but I'll try, the signs work now, but I save them via UUID's. How would I get the name of the player?
     
  5. Bukkit.getPlayer(uuid).getName(); that's how you can get the player's name from an uuid. And with the skulls, it can always be that you've saved the wrong location for them. or the wrong world
     
  6. Offline

    iAmGuus

    Ok, I found the problem. The heads aren't working because I use the uuid's. Bukkit asks for the username. I now use getPlayer. But it gives me a NPE cuz the player isn't online. I used getOfflinePlayer, but didn't work either.
     
    Last edited: Apr 25, 2015
Thread Status:
Not open for further replies.

Share This Page