Basic server commands
In this article we'll be going over some of the basic Minecraft administration commands to keep your server running smoothly!
Let's start off with the most important!
Whitelist:
The Whitelist command is the core to almost any private server, or, simply any server that does not want anyone other than those they invite to join, such as a Twitch subcriber server, reward, events, etc.
To start, you'll need to make sure your server is stopped, you'll then want to make your way to the server.properties
file which you can find in your File Manager, if you're unsure how to access your server's files, please see our guide here:
- Now that you've got File Access, find the
white-list
option, this will by default be set tofalse
you will want to modify the value and make sure its set astrue
- Change the
enforce-whitelist
option that's set tofalse
totrue
as per the last setting!
Once the options have been modified, your server.properties
file should look like this:
Now that you've got a whitelist up and running, you need to add players to the whitelist so that they can join!
To do this, you can simply open up your Pebblehost control panel console:
Once you've reached your console, you need only type the following command: whitelist add username
You'll want to add yourself and your friends you intend on playing with, you may now join your server securely.
If it worked, you'll see the following output:
OP Command (Administrator commands in-game)
The operator role, also known as a server OP is simply the base command to provide a user with all permissions for the basic server commands, such as, stop, restart, start, teleport, spawn items, etc.
The process of becoming an operator is a lot easier than the whitelist and requires no file editing whatsoever.
Simply, all you need to do is head back to the console page that we added players to the whitelist with, once there, run the following command: op username
This should prompt the following if done correctly:
Do please note, if you plan on using a permissions plugin such as Luckperms, the operator command should not be used, instead, just give yourself permissions via the permissions plugin.
We have a guide on Luckperms available here:
Setting Spawn
The next command is pretty straight forward, if you want players landing in a specific spot when they join the server.
To run this, you will need either operator permissions as per the previous command, or, permissions given by your permission plugin.
If you're set with permissions, simply type out the following command: /setworldspawn
in-game while standing/looking in the spot you wish players to join onto.
If you have permission and this is done correctly, you should be greeted with the following message:
Teleporting
The teleport command, also aliased as tp
is used to move a player to another location, this could be another players locations, specific coordinates or many other options that can be seen here:
The most common use is teleporting to another player, do please note, you will need operator permissions, or, the relevant teleport permissions on your permissions plugin.
Once you're good to go with permissions, you can simply run the following command: /tp player1 player2
Changing gamemode
As I'm sure you're already familiar with what exactly the gamemodes are, I won't go into too much details, simply put, the gamemode command allows you to switch between survival, creative, adventure & spectator game modes.
To do this is very simple, once you have the relevant permissions or are operator on your server, simply type: /gamemode <survival/creative/adventure/spectator> <username>
Alternatively, this can be run from the console without permissions by simply typing the same command without the slash: gamemode <survival/creative/adventure/spectator> <username>
Giving items to players
Now, you can opt to just set your game mode to creative and then spawn the items in that way, that also works, but, there's another command that allows you to give you or anyone else any amount of a specific item, or, items.
To do this, simply type the following command in game: /give <user> <item> <ammount>
You may also run this in the console as per: give <user> <item> <ammount>
And that about tops off all of the common commands you will need to use on your Minecraft server.
If you have any issues setting up your server initially to get to this stage, we have a lovely video guide to get you going here:
Updated on: 19/08/2021
Thank you!