Solved Individual scoreboard for every player

Discussion in 'Plugin Development' started by Sw_aG, Feb 9, 2020.

  1. Offline

    Sw_aG

    "Hello world" - (OMG IM SO ORIGINAL)

    I'm trying to create a very simple scoreboard that will show you how many kills you got.
    But I can't figure out how to change the value for each individual player
    I've made the scoreboard and all, but I don't know how to show everyone THEIR own score
    I thought about making every single player a new scoreboard that looks identical to the main board
    with the exception that he sees the value of his own kills, but it seems kind of a hassle.
    Is that the only way of doing it ? is there some value you can share ?


    If anyone can shed some light about this topic I'll appreciate the knowledge.
    Thanks !
     
  2. Online

    timtower Moderator Moderator

    @Sw_aG You could let placeholderapi handle it.
     
  3. Offline

    Sw_aG

    @timtower Is it possible without an API ?
     
  4. Online

    timtower Moderator Moderator

    @Sw_aG Then it will just be more hassle.
     
  5. Offline

    EvilestVirus7

    @Sw_aG you can use this if you don't want to use the PlaceHolderAPI:
    Code:
    player.getStatistic(Statistic.PLAYER_KILLS);
    This will go get your statistics on the server and after the kills stats! The code bellow will return a int so if you have 70 player kills, it will return 70!

    Have a great day
    EvilestVirus7
     
  6. Offline

    Sw_aG

    Thanks for replying.
    I actually created myself a good method for every player, but I'm sure this will come in handy for people who will look up scoreboard related code.
    Have a good day :D
     

Share This Page