Minecraft Server Admin/Op commands

Minecraft Server Admin/Op commands are entered into the chat window and are preceded by a “/” when playing in-game, but when entering commands at the server console you need to miss out the preceding “/”.

(This table is copied from http://wiki.multiplay.co.uk/Minecraft/Operators and is here purely for my convenience and laziness)

Command Description Usage
help or ? Shows a list of server commands in the console or in-game. help
kick Removes player from the server with the message “Kicked by admin” kick username
ban Bans player from the server with the message “Banned by admin”, banned players who attempt to connect are presented with the message “You are banned from this server!” ban username
pardon Removes the specified player from banned-players.txt, allowing them to connect to the server again pardon username
ban-ip Bans an IP address from the server, the full IP address must be specified; wildcards are not valid. Players who are banned through this method will see “Your IP address is banned from this server!” when attempting to connect ban-ip ipaddress
pardon-ip Removes the specified IP from banned-ips.txt, allowing players with that IP to connect to the server again pardon-ip ipaddress
op Writes the players name to ops.txt, giving them access to the op commands op player
deop Removes a player from ops.txt, revoking their access to the op commands deop player
tp Moves the first player specified to the location of the second player specified tp player1 player2
give Gives a specified amount of a block, the ids are known as data values give player id amount
stop Gracefully stops the server stop
save-all Forces a server-wide level save save-all
save-off Disables terrain saving (useful for backup scripts) save-off
save-on Re-enables terrain saving. save-on
list Lists all currently connected players list
say Broadcasts a message to all players without a player name being shown and putting message in pink text say message
whitelist Enable or disable whitelisting (i.e. only listed players may join) whitelist on/off
whitelist Add or remove player from the whitelist whitelist add/remove player
whitelist list Lists all currently whitelisted players whitelist list
whitelist reload Reload the whitelist from white-list.txt whitelist reload
time Add to or set the world time. Amount may be a number between 0 and 24000, inclusive, where 0 is dawn and 12000 is dusk time add/set amount

Minecraft Server Admin tips – using the Linux screen command

 

 

Getting started with the Linux “screen” command:

This tip follows on from the the earlier post Minecraft and Minecraft Pocket Edition Servers on Ubuntu Linux

The Linux “screen” command is a very useful tool for managing one or many Minecraft and Minecraft Android/Pocket Edition processes.

First off, check you have screen installed on your Linux server by doing;

don@ubuntuserver:~$ which screen

that  should return something like:

/usr/bin/screen

if it doesn’t, you may need to install it like so:

sudo apt-get install screen

(or whatever works for your platform)

then you can start kicking off your Minecraft processes like this

 screen ./start.sh

when that’s up and running you can disconnect from the screen by doing

Ctrl-a d

This will detach you from the screen/console but leave the server running – meaning you can log off or go and do something else.

To reattach to the running screen (assuming there’s only one) and get back to the console at a later time, you just do this:

screen –r

If there is more than one screen sessions available you’ll be given a list of them, something like this:

There are several suitable screens on:
15772.pts-1.ubuntuserver(06/01/14 22:05:25)     (Detached)
2088.pts-4.ubuntuserver (06/01/14 15:20:59)     (Attached)
2013.pts-3.ubuntuserver (06/01/14 15:20:13)     (Detached)

from which you can then do:

screen -r [pid.]tty.host

using the pid and tty host values from that list, e.g. “screen –r 2013.pts-3.ubuntuserver” or “screen –r 15772.pts-1.ubuntuserver” in my example.

There are loads of other useful screen commands – check out the man page for further info – but the above allows me to manage multiple Minecraft servers easily.

Pin It on Pinterest

%d bloggers like this: