Skip to content

Syntax Reference

Ahmad Saleem edited this page Sep 5, 2026 · 2 revisions

Every piece of syntax skNetwork adds, on one page. Square brackets are optional words, (a|b) means either. Each entry links to the page that explains it.

Variables

Any variable whose name starts with the prefix, ? by default, is a network variable. There is no syntax to learn. See Network variables.

set {?coins::%player%} to 100
delete {?online::lobby::*}

Conditions

Syntax Meaning
network is synced This server has finished its first sync and accepts writes.
network (is not|isn't) synced The opposite.
[the] atomic change (succeeded|was accepted) The proxy applied the last and wait change.
[the] atomic change (failed|was refused) It did not, or nobody answered.
[the] atomic change (timed out|went unanswered) No reply came back in time.
[the] atomic change (was answered|did not time out) A reply came back, either way.
network server[s] %strings% (is|are) online Those servers are connected and synced.
network server[s] %strings% (isn't|is not|aren't|are not) online The opposite.

Sync and events covers the first two, Atomic changes the middle four, Network players the last two.

Effects

Syntax Meaning
atomically add %number% to %variable% [and wait] The proxy does the sum.
atomically (remove|subtract) %number% from %variable% [and wait] The proxy does the subtraction.
atomically (remove|subtract|take) %number% from %variable% without going below %number% [and wait] Refused if the result would fall below the floor.
atomically set %variable% to %object% if it( is|'s) not set [and wait] Only the first server to try wins.
atomically set %variable% to %object% if it( is|'s) %object% [and wait] Only if the current value matches.
send network message %objects% to network player[s] %strings% A message to a player on any server.
broadcast %objects% (across|to) [the] network A message to everyone on every server, and every console.
send network action[ ]bar %objects% to network player[s] %strings% An action bar to a player on any server.
send network action[ ]bar %objects% to [the] [whole] network An action bar to everyone.
(connect|send) network player[s] %strings% to [server] %string% Move a player to another server.
execute [console] command %string% on network server[s] %strings% Run a console command there. Needs remote-commands.
execute [console] command %string% on [the] [whole] network Run it on every server. Needs remote-commands.

Atomic changes covers the first five, Network players the rest.

Expressions

Syntax Type Meaning
network server name text The name this server goes by, from server-name.
name of th(e|is) network server text The same.
[the] atomic result any The value the proxy holds after the last and wait change.
[the] atomic (error|refusal reason) text Why the proxy refused, or that nobody answered.
[all [[of] the]|the] network servers texts Every server connected to the proxy.
[all [[of] the]|the] network players texts Everyone online on the network.
[all [[of] the]|the] network players (on|of) [server[s]] %strings% texts Everyone on those servers.
network server of [player[s]] %strings% text Which server holds that player.
%strings%'[s] network server text The same.
[the] (message of the day|motd) of network server %string% text That server's MOTD.
[the] version of network server %string% text That server's Minecraft version.
[the] (max[imum] player count|[max[imum]] player limit) of network server %string% number That server's player limit.
[all [[of] the]|the] whitelisted players of network server %string% texts Names on that server's whitelist.
[the] changed [network] variable text Inside on network variable change: the name, without prefix.
[the] new value any Inside the same event: the value now, unset for a delete.
[the] (old|previous) value any Inside the same event: the value before.

Sync and events covers the name, Atomic changes the atomic pair, Network players the server and player ones, and Sync and events the last three.

Events

Syntax Fires when
on network sync[ed] This server's copy is filled in and writes are accepted. Again after every reconnect.
on network disconnect[ed] This server loses the proxy.
on network variable change [of %string%] A network variable changes anywhere, including here. * in the name is a wildcard.

All three are on Sync and events.

Commands

Command Where Does
/sknet game server State, proxy, copy size, latency.
/sknet resync game server Throw the copy away and pull everything again.
/sknet reconnect game server Drop the connection and resume where it stopped.
/sknetproxy proxy State, connected servers, variable count.
/sknetproxy push proxy Send scripts now.
/sknetproxy dump <pattern> proxy Look up variables by name, * is a wildcard.

Aliases: /sknetlocal and /sknl for the game server, /sknetp and /sknp for the proxy. Both need sknetwork.admin. Details on Configuration.

Clone this wiki locally