> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/examples/tablistpings.md).

# TabListPings

Every 5 seconds, shows the three players with the highest ping from the tab list, in your own chat only.

```javascript
script.description = "Shows who lags the most.";

let ticks = 0;

script.addListener("PostTickEvent", () => {
    if (++ticks % 100 !== 0 || !mc.connection) return;

    const worst = mc.connection.onlinePlayers
        .filter((info) => info.latency > 0)
        .sort((a, b) => b.latency - a.latency)
        .slice(0, 3);

    if (worst.length) mc.displayMessage("Highest ping: " + worst.map((i) => `${i.name} ${i.latency}ms`).join(", "));
});
```
