Tab messing up with player glow :(

Discussion in 'Spigot Plugin Development' started by Metal123, Dec 7, 2018.

  1. Hey, I need help with my player glow plugin I made a rainbow glow and the player's team changes constantly and it makes the names in tab flickers up and down, Is there a fix to that?
     
  2. Tab orders players be team, so that's why the names are moving around.
    You'll want to avoid moving players between different teams, so you'll have to keep them in the same team regardless of which color they are.
    The easiest solution is going to be creating a new team for each individual player, and then you can change the team color as needed instead of switching players to different teams. If you name the team after the player, you'll get the advantage of maintaining alphabetical order, although players without a team will still be at the bottom regardless of where they belong alphabetically.
     
    • Informative Informative x 2
  3. There is a better, more optimized, better scaled, way to create this rainbow effect. You can change the player list name every interval to include the new color tag. The list is only ordered on team and actual team, so this will not effect the order. Moreover, no scoreboard data has to be created, stored, send and thus it is way faster.
     
    • Useful Useful x 1
  4. The question is asking about glows, though, and I think glow color comes from the team color only.

    Of course, it would still be important to make sure a bunch of teams aren't being saved to the disk. I guess just don't use the main scoreboard?
     
  5. Oh, sorry, I misread the post. However, the core of my post is still the same: it is better to use packets than to make new scoreboards. You can make this work without actually changing teams and thus without changing the order of the players.
     
  6. Heyy, do you have any tutorials on how to do this with packets?? I know howtta do it with the spigot api but, as you said, it’s really not that efficient
     
  7. md_5

    Administrator Developer

    Silly concern.
    Don’t bypass the api because sending packets is 50 microseconds quicker.
    If that’s a real concern then you may as well not use Spigot at all and just do everything via NMS mods
     
    • Agree Agree x 1
  8. Ìt is true that the API should have priority to packets, however, if you have hundreds of players, creating a scoreboard and team for every single client can take a lot of memory away from the server. This is my reasoning behind the post I made. I understand that using packets is a dirty way, but every api has its limits, and sometimes, going outside the api can help a lot.
     
  9. md_5

    Administrator Developer

    What is a lot of memory in this case?

    2 megabytes?

    You would be surprised how little memory things use.
     
  10. You probably know more about this stuff than me and thus there is a big chance I am indeed overthinking this. I always had problems with server performance, maybe because I had the worst laptop available. I am also someone who spends way to much time on optimization, both nano, micro and normal optimization. 2 Megabyte is indeed not a lot of memory these days, not enough for packets to be worth it. However, I still have the opinion that the use of packets may be better in some cases. It is indeed a question of context, and I was wrong in this context.
     
  11. I really think it’s better to use packets with 200 players online rather than the api. Wouldcha like to show me how to do it though?
     

Share This Page