1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Help understanding ScoreBoards

Discussion in 'Development' started by mm899, May 14, 2019.

  1. mm899

    mm899 Spider Jockey

    Messages:
    32
    Hi, I plan on implementing scoreboards in a plugin that I am currently working on, I’ve been looking around the development section about different threads related to scoreboards but I’m struggling to fully grasp it. So from what I have understood, I need to create a SetDisplayObjectivePacket and then send it to the server players, I intend on having a countdown/timer in the scoreboard, so how would I continuously update it to display the latest number in the countdown.
    Any help/explanation would be much appreciated :)
     
  2. mm899

    mm899 Spider Jockey

    Messages:
    32
    Would creating a scheduled task which changes the line and sends the packet to all player every second work?
     
  3. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    Im pretty sure you have to despawn and respawn it to the player to update the text
     
    Diduhless, mm899 and GamakCZ like this.
  4. mm899

    mm899 Spider Jockey

    Messages:
    32
    How can I do this?
     
  5. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    by sending SetDisplayObjectivePacket and then sending the RemoveObjectivePacket to the player. But make sure you store/remember the packet objectiveName from when you sent it to the player to remove it.

    EDIT: i personally make the objectiveName packet property the players name but you can choose what you want todo with it
     
  6. mm899

    mm899 Spider Jockey

    Messages:
    32
    Thanks for your help I will give this a go shortly :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.