Skip to content

Server

Connection info plus the server-pushed UI: tab list and boss bars.

Text values are text snapshots.

Connection

Function Returns
server.address() Server address, nil in singleplayer
server.ping() Your ping in ms
server.brand() "vanilla", "paper", …; nil until the server says

Tab list

Function Returns
server.tablist.header() Custom header, or nil
server.tablist.footer() Custom footer, or nil
server.tablist.entries() Listed players in tab order

An entry is {name, uuid, display_name, ping, gamemode}: account name, the rendered row with team styling, latency in ms, and a gamemode like "survival".

for i, entry in ipairs(server.tablist.entries()) do
    print(i, entry.display_name:string(), entry.ping .. "ms")
end

Boss bars

server.bossbars() returns every visible bar in display order as {uuid, name, percent, color, style}:

  • name is a text component
  • percent runs 0..1
  • color is "pink" · "blue" · "red" · "green" · "yellow" · "purple" · "white"
  • style is "progress" · "notched_6" · "notched_10" · "notched_12" · "notched_20"
for _, bar in ipairs(server.bossbars() or {}) do
    print(bar.name:string(), math.floor(bar.percent * 100) .. "%")
end
Navigation

Type to search…

↑↓ navigate↵ selectEsc close