Packet scoreboard lines not set for some players

Discussion in 'Spigot Plugin Development' started by MathWellan, Nov 9, 2018.

  1. Hi,

    The line 3 of my Scoreboard isn't set for all players (they have the other lines), I tried to debug and the switch cases are called every second as expected and the countdown is shown in debug messages. I use this class to deal with scoreboards without blinking effect :

    Here's the class with the update void :
    The task to update the timer on the scoreboard every second :
    The class with the HashMap :
    GameStates is just an enum with getters and setters

    Thank you by advance for your help !
  2. Hello,
    Pleased to see your work on nms !
    You should work intelligently and use available tools.
    I personally use the protocollib reflection class.
    Here is a private example : here
    why static ? you can add final too
    because using reflection is consuming a lot,
    you must call it as little as possible

    It's much more readable for you and us.
    after you have converted everything, we could discuss and maybe even solve your problem by yourself.
    I do not force you to use it at all, but in this case maybe you should do your own util class :)
  3. Salut coco !

    Do you think that using final in the ScoreboardManager class would change something ?
    I never used reflection and I think it's above my skill level, I appreciate zyuiop's class and I use one improved by Seveningful, you probably know him.

    P. S. : You can see it in the nms imports but I forgot to say that I still use 1.8
  4. Obviously, you do not need to use a final where you do not need it for scoreboard. It is different when you are using Reflection (see my example class).
    This reveals that you did not try to understand the code you are using.
    In the meantime the class is pretty not well coded,
    this version seems to be a better alternative :
    The best one is here (highly recommend you to use it):
  5. I am using XoreBoard now thanks, too bad there's no way to remove a line using the number of the line because knowing the string is difficult when it's a countdown wrote in x)

    EDIT : In fact because of that I'm forced to use clearLines() and nothing appears now I clear all the lines every second
    #5 MathWellan, Nov 10, 2018
    Last edited: Nov 10, 2018
  6. I tried the Scoreboard class of Vinetos, but it's blinking.. that's the issue Sevening corrected in his version of zyuiop's class

Share This Page