Skip to content

Script Sharing

Ahmad Saleem edited this page Sep 6, 2026 · 4 revisions

skNetwork can keep .sk files on the proxy and send them to your game servers. Edit one copy, run one command, and every server loads the new version.

It's off by default.

Turning it on

In the proxy's plugins/skNetwork/config.yml:

scripts:
  enabled: true
  groups:
    hubs:
      - lobby
      - lobby2
  max-file-kb: 512
  max-total-mb: 16

Restart the proxy.

plugins/skNetwork/scripts/ is created on the first start whether or not the feature is on, with a global folder and a short README inside, so you can see where scripts go before you commit to turning it on.

Folders decide who gets what

Every script lives in a folder, and the folder name decides which servers get it.

plugins/skNetwork/scripts/
    global/
        economy.sk      -> every connected server
        stats.sk        -> every connected server
    hubs/
        hub.sk          -> lobby and lobby2 only

global always means every server and can't be redefined. Every other folder name has to appear under groups, or nothing inside it goes anywhere. The proxy warns you at startup:

scripts/minigames/ has no matching group in config.yml,
so nothing in it will be pushed anywhere

A file dropped straight into scripts/ with no folder is skipped, and the console says so.

Groups can include other groups

Write a group name with a / on the end to include it in another:

  groups:
    hubs:
      - lobby
      - lobby2
    everything:
      - hubs/
      - survival

Now scripts/everything/ reaches lobby, lobby2, and survival without listing the hubs twice.

A group that includes itself, directly or through a chain, is a mistake. The proxy finds it at startup and prints the chain instead of crashing later.

Pushing

Put your files in place and run this on the proxy console:

/sknetproxy push

Each server writes the files to plugins/Skript/scripts/skNetwork/, loads them, and reports back:

skNetwork: pushed to 3 server(s), results follow in the console.
  lobby: 15 script(s) loaded from manifest 97
  lobby2: 15 script(s) loaded from manifest 97
  survival: 14 script(s) loaded from manifest 97

Survival has one fewer because hubs/hub.sk doesn't reach it.

Only changed files are sent. skNetwork compares a hash of every file, so pushing again with no edits costs one small message per server.

Errors come back to the proxy

If a script doesn't load, the proxy console tells you which server, which file, which line, and what Skript said:

lobby: 15 loaded, 5 error(s) from manifest 95
  -> global/wikitest.sk:63 Can't understand this expression: the atomic change succeeded
  -> global/wikitest.sk:66 Can't understand this expression: the atomic change succeeded

No need to open each server's console.

Style warnings are listed separately with a ~ in front, so a script that loaded fine doesn't look like a failure.

Don't edit the files on the game servers

plugins/Skript/scripts/skNetwork/ on each game server belongs to skNetwork. It writes a README.txt in there saying the same thing.

Every push overwrites those files, and any file the proxy no longer has is deleted. Edit the copy on the proxy and push again.

How a push works

  1. The proxy sends a list of every file that server should have, with a hash of each.
  2. The server compares that list to its disk and asks only for what it's missing.
  3. The proxy sends those files.
  4. The server writes them to a staging folder first.
  5. Once every file has arrived, it swaps them into place and reloads.

Sequence diagram: the proxy sends a MANIFEST of files and hashes, lobby FETCHes only what changed, the proxy sends each FILE, and lobby returns a LOAD_RESULT.

If the connection drops halfway, the staging folder is thrown away and nothing on the server has changed. Each file's hash is checked when it arrives, and a file that doesn't match kills the whole push rather than leaving it half applied.

Turning it off again

Set enabled: false and restart the proxy. Each game server clears plugins/Skript/scripts/skNetwork/ as it reconnects, leaving only the README:

removed global/economy.sk, the proxy no longer has it

Off means the proxy distributes nothing, so a server that is still running what it was sent last week is not off. The originals are all on the proxy, so nothing is lost by this; turn it back on and push to put them back.

While it is on, a server reports what it is holding at startup:

holding 15 script(s) pushed by the proxy, in plugins/Skript/scripts/skNetwork/.
Turning script distribution off on the proxy clears them from here on the next connect.

Upgrading from 0.3.0 or older

These files used to land in plugins/Skript/scripts/network/. On the first start after updating, each server moves that folder to skNetwork/ and says so:

moved pushed scripts from plugins/Skript/scripts/network/ to skNetwork/

If both folders somehow exist, nothing is moved and the server warns instead, because Skript still loads the old one and nothing pushes to it any more. Check what is in network/ and delete it.

Size limits

Setting Default Meaning
max-file-kb 512 A single file larger than this is skipped
max-total-mb 16 The scan stops once the library reaches this size

Both are in the proxy config. A skipped file is named in the console.

Security

Anyone who can put a file in plugins/skNetwork/scripts/ can run code on every game server. Treat write access to that folder as console access to the whole network.

skNetwork checks every path it receives before writing it, so a bad manifest can't escape the scripts folder and overwrite server.properties. That protects the game servers from a broken or hostile proxy. It doesn't protect you from someone you gave folder access to.

See also

  • Setup for first time setup.
  • Examples for scripts worth pushing everywhere.

Clone this wiki locally