Ping or tps formatting - montlikadani/TabList GitHub Wiki

Such operators, as conditional (logical) operators, are used for ping and tps formatting to set different colors when, for example, the return value of TPS is 16.0, so the server performance is in poor condition. This feature has only been added to add an additional feature to the plugin and to make some formal changes.

Conditional operators

Operator Explanation
== Tests that the return value is equal to the specified one
!= True if the two comparable value are not equal, false otherwise
< Compares two values, true if the first one is smaller than the second
<= Compares two values, true if the first one is smaller or equal the second
> Compares two values, true if the first one is greater than the second
>= Compares two values, true if the first one is greater or equal the second

Examples

formats:
- "&a%ping% <= 200"
- "&6%ping% >= 200"
- "&c%ping% > 500"

As shown in this example, it is necessary to specify the variable %ping% as a placeholder for the condition to be true if this return value of the placeholder is comparable to the value of the specified condition. Assuming that the return value of the %ping% placeholder is greater or equal to 200, the color will also change from green (&a) to gold (&6) because the ping is high.

For tps, the situation is the same as for ping, but conditions must be specified with smaller numbers.

Examples

formats:
- '&a%tps% > 18.0'
- '&6%tps% == 16.0'
- '&c%tps% < 16.0'

For this example, we now need to use the placeholder %tps% (Ticks per second), the value of which depends on the performance of the server.

Tips

You can increase the decimal number of the placeholder return value %tps% with the size option.

It is possible that the return value of tps is not only 20.0, but can even be 25.2. The %tps-overflow% placeholder will gives you this ability.