Reference

Command

Sends a line to the server console, or starts, stops or restarts the server.

Category
Action
Topics
Scheduler ยท Console
01

Ports

Commandaction
  • triggercontrol
  • Commandstring
  • onCompletecontrol
  • onFailedcontrol
  • Command sentstring
Ports Control Data
Data types string number bool

Strings accept any data input.
Numbers accept boolean input.

02

Fields

Field What it does Default Limits
Command The console command to send, or one of three server actions. One line only. None
  • Start Server
  • Stop Server
  • Restart Server
  • Save All
  • Freeze Time
  • Set Day
  • Set Night
03

What a run does

A wired Command outranks the field.
An empty value leaves by onFailed.
Otherwise the block leaves by onComplete when the action is done, or by onFailed if it errors.

Start Server (__start__) launches the server with its saved jar, JVM arguments and working folder.
It leaves as soon as the process is launched, not when the server is ready.
Stop Server (__stop__) stops the server and waits for it to exit.
It waits up to the Stop grace period in Settings, then force-ends the process.
Restart Server (__restart__) stops, then starts.
On a stopped server it only starts.

Any other value is written to the server console as one line.
onComplete means the line was written.
The server's reply is not read.
The presets Save All, Freeze Time, Set Day and Set Night send save-all, time set 18000, time set day and time set night.

Command sent carries the value that ran, such as __stop__ for Stop Server.
It is set only when the block succeeds.

04

Errors

Message says Do
command is empty Fill in Command, or wire a value into it.
server already running Use Start Server only while the server is stopped.
server not running Make sure the server is up when this block runs.
another power action is in progress Wait for the running start, stop or restart to finish.
command must be a single line Remove the line break from the command.
failed to start server: reason Fix what the reason names, then run again.