HyperScript
Docs

← All of the Docs Players

Offline players

expression<text> as offlineplayersince 1.7.26

That player, online or not. If they have played here, the name is written the way the server has it: "progamer52" as offlineplayer gives Progamer52. A name that has never joined stays as written

command /seen <player>:
    trigger:
        set {_who} to arg.1 as offlineplayer
        if {_who} has not played before:
            send "&c%arg.1% has never played here."
            stop
        send "&7%{_who}% was last on " + last seen of {_who} formatted as "d MMMM yyyy"
Try it
condition<who> has played beforesince 1.7.26

Whether they have ever joined this server

command /known <player>:
    trigger:
        if arg.1 has played before:
            send "&a%arg.1% has been here."
        else:
            send "&c%arg.1% has never joined."
Try it
expressionuuid of <who>since 1.7.26

Their id, which stays the same when they change their name

command /uuid <player>:
    trigger:
        set {_who} to arg.1 as offlineplayer
        if {_who} has played before:
            send "&7%{_who}%: &f" + uuid of {_who}
Try it
expressionname of <who>since 1.7.26

Their name as the server has it

command /realname <player>:
    trigger:
        send "&7That is &f" + name of arg.1
Try it
expressionall offline playerssince 1.7.26

A list of the names of everybody who has ever played here, online or not

command /everyone:
    permission: staff.everyone
    trigger:
        async:
            set {_all} to all offline players
            send "&7%size of {_all}% player(s) have played here."
Try it
Guide and examples

A player is somebody who is online or who has played here before, and much of what a script knows about a player it also knows when they are away:

command /coins <player>:
    trigger:
        set {_who} to arg.1 as offlineplayer
        if {_who} has not played before:
            send "&c%arg.1% has never played here."
            stop
        send "&e%{_who}% &7has &f%{%{_who}%.coins}% &7coins."
SyntaxMeaning
<text> as offlineplayerThat player, online or not. If they have played here, the name is written the way the server has it: "progamer52" as offlineplayer gives Progamer52. A name that has never joined stays as written
<who> has played beforeWhether they have ever joined this server
uuid of <who>Their id, which stays the same when they change their name
name of <who>Their name as the server has it
all offline playersA list of the names of everybody who has ever played here, online or not
  • Works for someone offline: their own variables ({%{_who}%.coins}), uuid of, name of, first join date of, last seen of, balance of with an economy plugin, is online, is op, is banned, has played before, ban, unban and the top lists.
  • Needs them online: everything about where they are and what they carry: location, health, inventory, effects, messages, titles and teleporting. Asked of someone offline, a value is unset and a statement does nothing.
  • as offlineplayer only looks at who has played on this server. It never asks Mojang, so it does not slow the server down. A name that has never joined is kept as it was written, because it can still be banned before it ever joins; has not played before tells the two apart.
  • all offline players reads the server's list of players from disk. On a server with many thousands of them, ask for it in an async: block.