HyperScript
Docs

← All of the Docs Data and the outside

Server list

effectset motd to <text>since 1.5.2

The message of the day. \n starts the second line; & colour codes work · Spigot and Paper

set motd to random item of ["&6Welcome!", "&bNew: sky islands", "&dVote for rewards"]
Try it
effectset max players to <number>since 1.5.2

The limit shown after the slash. The real limit stays as it is · Spigot and Paper

set max players to 100
Try it
effectset shown players to <number>since 1.5.2

The online count shown · Paper

set shown players to server.online_players + 20
Try it
effectset player list to <text>, <text>, ...since 1.5.2

The lines shown when the mouse rests on the player count; a list value works too · Paper

set player list to "&6Welcome!", "&7Survival and minigames", "&7discord.gg/example"
Try it
effecthide player countsince 1.5.2

Shows ??? instead of the counts · Paper

on server ping:
    hide player count
Try it
effectset server icon to <path>since 1.5.2

The icon: a 64 by 64 pixel PNG inside the plugin folder, such as "plugins/HyperScript/icon.png" · Spigot and Paper

on server ping:
    set server icon to "plugins/HyperScript/icon.png"
Try it
Guide and examples

on server ping runs whenever a client refreshes its server list, and can change what that client sees: the message of the day, the player counts and the icon.

on server ping:
    set motd to "&6My Server &7- &a%server.online_players% online\n&eDouble coins weekend!"
    set max players to 100
    set shown players to server.online_players + 20
    set player list to "&6Welcome!", "&7Survival and minigames", "&7discord.gg/example"
StatementChangesServer
set motd to <text>The message of the day. \n starts the second line; & colour codes workSpigot and Paper
set max players to <number>The limit shown after the slash. The real limit stays as it isSpigot and Paper
set shown players to <number>The online count shownPaper
set player list to <text>, <text>, ...The lines shown when the mouse rests on the player count; a list value works tooPaper
hide player countShows ??? instead of the countsPaper
set server icon to <path>The icon: a 64 by 64 pixel PNG inside the plugin folder, such as "plugins/HyperScript/icon.png"Spigot and Paper

%server.motd% is the MOTD from server.properties, and %event.address% the IP address of the client asking. To rotate messages, pick one at random:

on server ping:
    set motd to random item of ["&6Welcome!", "&bNew: sky islands", "&dVote for rewards"]
  • There is no player in this event. The client has not logged in yet, so {%player%.*} variables and the player placeholders are unset. Global variables work.
  • It runs very often, and not on the server thread, so every refresh of every client's list triggers it. Keep the block to a few set lines: no loops, files or web requests.
  • A statement marked Paper does nothing on Spigot except log one warning.
  • Clients cache the icon and refresh the list at their own pace, so a change can take a moment to show.