Scoreboard isnt showing up

Discussion in 'Spigot Plugin Development' started by TheRandomGamer, Jun 16, 2015.

  1. Hello,
    I wanna make a scoreboard and I get no errors but when i come on the server, it isnt showing a scoreboard
    here is the pastebin link http://pastebin.com/iz1hY2UH
    please help
     
  2. sothatsit

    Patron

    You only show the scoreboard to people when the server is started in onEnable. Unless you reload the server, no one will be online when this code is ran. You need to listen to the PlayerJoinEvent and set their scoreboard to your one then.
     
  3. On the top of your imports do:

    Scoreboard name.

    It should work then
     
  4. sothatsit

    Patron

    Also, don't use Bukkit.getOfflinePlayer(), that will cause immense amounts of lag due to it retrieving the players uuid from the mojang servers. Use the new methods which support just a String instead.
     
  5. sothatsit

    Patron

    What are you talking about?
     
  6. Package name

    Import stuff

    Public class..

    Scoreboard "Name"
     
  7. Cause its still not showing up
     
  8. sothatsit

    Patron

    You make no sense whatsoever.

    Your getting there, but you need to register your events in your onEnable();

    Bukkit.getPluginManager().registerEvents(this, this);
     
  9. Well, thats was pretty dumb of me, it works now, thanks for the help sothatsit i appreciate it :D
     
    • Like Like x 1
  10. 1 more question, do you know how i can make the score a string instead of an int? @sothatsit
     
    #12 TheRandomGamer, Jun 16, 2015
    Last edited: Jun 16, 2015
  11. No you can't but you can ignore the score like a lot of plugins do:

    TITLE
    Your kills: 10 000------15
    Your deaths: 1 000-----14
    ------------------------------13
    Rank:----------------------12
    VIP-------------------------11

    etc...