TPS

Calculates server tick rate based on SetTime packet. You can display TPS by using scripting and Status Overlay. Use method tps.get() → float.
Example 1. Display TPS with 1 decimal:
main.addText("TPS: " + convert.toString(tps.get(), 1));
                
Example 2. Display TPS in different colors with 2 decimals:
float tpsVal = tps.get();
string tpsColor;
if (tpsVal > 19.8) {
    tpsColor = "#00FF21";
} else if (tpsVal > 19) {
    tpsColor = "#FFD800";
} else {
    tpsColor = "#FF006E";
}
main.addText("#CDC1FF", "TPS:", tpsColor, convert.toString(tpsVal, 2));