Skip to content

Server commands

BenCheung0422 edited this page Oct 23, 2024 · 2 revisions

Warning

This page is being migrated to the Minicraft Wiki on wiki.gg, so no further updates to the information are made here. If the migration is completed, this page will be deleted.

NOTE: Multiplayer has been removed from the game until further notice. A multiplayer mirror is maintained by El-Virus.

Here is a list of the server commands. The list, and in-game help page/text, is defined in minicraft.core.io.ConsoleReader.java, but I'll sort of duplicate it here.


HELP

Arguments: --all | [cmd]

describes the function of each command. Specify a command name to read more about how to use it.

no arguments: prints a list of all available commands, with a short description of each.

cmd: a command name. will print the short description of that command, along with usage details such as what parameters/arguments it uses, and what function each argument has, and what the defualt behavior is if a given argument is ommitted.

--all: prints the long description of all the commands.

Usage symbol meanings:

  • | = OR; specifies two possible choices for a given argument.

  • [] = Optional; the arguments within may be specified, but they are not required.

  • <> = Required; you must include the arguments within for the command to work.

Note that the usage symbols may be nested, so a <> inside a [] is only required if you do whatever else is inside the [].


STATUS

Arguments: none.

display some server stats.

displays game version, server fps, and number of players connected.


CONFIG

Arguments: [option_name [value]]

change various server settings.

no arguments: displays all config options and their current values

option_name: displays the current value of that option

option_name value: will set the option to the specified value, provided it is a valid value for that option.


STOP

Arguments: none.

close the server.

RESTART

Arguments: none.

restart the server.

closes the server, then starts it back up again.


SAVE

Arguments: none.

Save the world to file.

GAMEMODE

Arguments: <mode>

change the server gamemode.

mode: one of the following: c(reative), s(urvivial), t(imed) / score, h(ardcore)


TIME

Arguments: [timeString]

sets or prints the time of day.

no arguments: prints the current time of day, in ticks.

timeString: sets the time of day to the given value; it can be a number, in which case it is a tick count from 0 to 64000 or so, or one of the following strings: Morning, Day, Evening, Night. the time of day will be set to the beginning of the given time period.


MSG

Arguments: [username] <message>

make a message appear on other players' screens.

w/o username: sends to all players,

with username: sends to that player only.


TP

Arguments: <playername> <x y [level] | playername>

teleports a player to a given location in the world.

the first player name is the player that will be teleported. the second argument can be either another player, or a set of world coordinates.

if the second argument is a player name, then the first player will be teleported to the second player, possibly traversing different levels.

if world coordinates are specified, an x and y coordinate are required. A level depth may optionally be specified to go to a different level; if not specified, the current level is assumed.

the symbol "~" may be used in place of an x or y coordinate, or a level, to mean the current player position on that axis. additionally, an offset may be specified by writing it like so: "~-3 ~". this means 3 tiles to the left of the current player position.


PING

Arguments: none.

Pings all the clients, and prints a message when each responds.