BungeeTabListPlus
BungeeTabListPlus copied to clipboard
Add support for average TPS placeholder
Currently the ${viewer server tps}
placeholder resolves the server's instantaneous TPS. This can sometimes cause weird values (Like >20TPS) and very volatile values, like 20, then 11, then 20 all within seconds of eachother.
Can support be added for average TPS, such as the results of the /tps
command?
Totally optional, colored output would be nice as an option too (green for >15, yellow for 10-15, red for <10 TPS)
The built-in TPS placeholder is averaged over 2 seconds. If you prefer the values from Spigot's command you can use the placeholders provided by PlaceholderAPI for that.
- https://github.com/CodeCrafter47/BungeeTabListPlus/wiki/PlaceholderAPI
- https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#server
You can use the custom placeholder mechanic to add color codes to the tps placeholder. Add the following custom placeholder:
customPlaceholders:
# colored tps:
# 0 - 12.5 -> red
# 12.5 - 17.5 -> yellow
# 17.5 - 20 -> green
colored_tps0:
!conditional
condition: "${viewer server tps} < 12.5"
true: "&c${viewer server tps}"
false: "&e${viewer server tps}"
colored_tps:
!conditional
condition: "${viewer server tps} < 17.5"
true: "${colored_tps0}"
false: "&a${viewer server tps}"
Then use ${colored_tps}
to display the tps.