Download the Cube Code plugin
The plugin runs your scripts on your Paper server (1.21.4 and newer). It connects out to Cube Code, so there is no port to open.
Always the latest version, already set up to connect to Cube Code: there is nothing to configure.
Install it
- Stop your Minecraft server (or keep it running and restart it in step 3).
- Put
cube-code-plugin.jarinto the server’spluginsfolder. On a hosting panel, that is the Files tab, then thepluginsfolder, then Upload. - Start or restart the server. Its console says the plugin is enabled and waiting to be linked.
- Open the editor, sign in with Discord and follow the steps to link your server. The last step shows a command to type into your server console (or in the game as an operator), for example
/servereditor link K7QF-M2XD.
That is all: the editor shows your server as Connected, and Apply sends your scripts to it.
Updating
Download it again and replace the old file in plugins, then restart. Your scripts, saved variables and the link to your account stay where they are (in plugins/server-editor).
Running your own relay instead
If you run your own relay (the small program that connects the editor and your servers) instead of the one Cube Code runs for you, build the plugin from the source code and set link.relay-url in plugins/server-editor/config.yml to your relay’s address. The plugin above is already set up for Cube Code’s own relay (wss://relay.cubecode.studio/link) and needs none of that.