Note: These commands work in both Single and Multiplayer game modes.
Another Note: Players can see op (operator) commands being entered and are broadcasted to the other ops online on the server as well.
A player must be an op in order to use these commands.
|clear <playername> [item] [data]||Clears the inventory of playername or the specified
|debug <start | stop>||Starts a new debug profiling session or stops the session currently running. It notifies about potential performance bottlenecks in the console when active and creates a profiler results file in the folder debug when stopped.|
|defaultgamemode <survival | creative | adventure>||Sets the default game mode that is shown on the world selection menu. New players that join the world will be put into the default game mode; i.e., if the default game mode is creative, new players will start in creative. The game modes can be abbreviated to "s/c/a" or "0/1/2" respectively.|
|difficulty <0 | 1 | 2 | 3>||Changes the difficulty. 0 is peaceful, 1 is easy, 2 is normal, and 3 is hard.|
|enchant <playername> <enchantment ID> [enchantment level]||Enchants the item that the player is currently holding. Note that this works within the normal limitations of enchanting items. Enchantments can only be applied to items which can normally receive that specific enchantment. Enchantment levels can not be above the normal highest achievable for the selected enchantment. Conflicting or overpowering enchantment combinations usually prevented are also prevented with this command.|
|gamemode <survival | creative | adventure> [playername]||Changes the game mode for playername. The game modes can be abbreviated to "s/c/a" or "0/1/2" respectively. If no playername is given, it will set your own gamemode. Remember, this will only affect playername and no one else. Note: Player must currently be online for the command to work.|
|gamerule <rulename> [true | false]||Activates or deactivates the rulename. Available rules are:
|give <playername> <data-value> [amount] [damage-value]||Spawns amount (defaults to 1) of the item defined by "Data values">data-value with the specified damage value (defaults to 0) at playername 's location. For example typing /give John 4 30 will give a player called John 30 blocks of cobblestone.|
|help [page | commandname] or ? [page | commandname]||Shows a list of available commands or further information to the commandname. Note: banlist, whitelist, toggledownfall, xp, tell, me, and kill commands are not listed.|
|op||In game syntax is /op <playername> or by adding the username to the "ops.txt" text file in the same folder as the Minecraft_Server.exe file, then restarting the server.|
|publish||Opens your single-player game for LAN friends to join. This command appears in the singleplayer cheats.|
|say <message>||Broadcasts message to all players on the server (in bright pink letters)|
|seed||Displays the seed.|
|spawnpoint <player> [x] [y] [z]||Sets the spawnpoint of that player to that position, or to the current position if x y and z are not specified.|
|time set <number | day | night>||Sets the world time. number is an integer between 0 and 24000, inclusive, where 0 is dawn, 6000 midday, 12000 dusk and 18000 midnight. "time set day" sets the time to 0, and "time set night" sets the time to 12500.|
|time add <number>||Increments the world time, as above. number must be 0 or positive.|
|toggledownfall||Toggles rain and snow.|
|tp <targetplayer>||Teleports yourself to targetplayer 's location|
|tp <playername> <targetplayer>||Teleports player playername to targetplayer 's location|
|tp <playername> <x> <y> <z>||Teleports player playername to coordinates x,y,z. (the y value cannot be smaller than 0). Can also relatively move the player by adding the ~ character before the coordinate value. For example typing /tp John ~3 64 ~3 will teleport a player called John 3 blocks away from his current x and z, and to y 64.|
|weather <clear | rain | thunder> <seconds>||Changes the weather. Only works in 12w32a or later. Maximum is 1000000|
|xp <amount> <playername>||Gives the specified user the given number of orbs. Maximum is 2,147,483,647 per command. Negative amounts may not be used to remove experience points.|
|xp <amount>L <playername>||Gives playername the amount number of experience levels. Maximum is 2,147,483,647. Negative amounts may be used to remove experience levels.|
These settings are to be changed in the server.properties file that is in the same folder as your Minecraft_Server.exe file.
NOTE: This file is automatically generated upon first start of the server (if it doesn't exist).
|allow-flight||boolean||false||Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed.
With allow-flight enabled griefers will possibly be more common, because it will make their work easier. In Creative mode this has no effect.
|allow-nether||boolean||true||Allows players to travel to the Nether.|
|difficulty||integer (0-3)||1||Defines the difficulty (such as damage dealt by mobs and the way hunger and poison affects players) of the server.
|enable-query||boolean||false||Enables GameSpy4 protocol server listener. Used to get information about server.|
|enable-rcon||boolean||false||Enables remote access to the server console.|
|enable-command-block||boolean||false||Enables Command Blocks
this option is not generated when you start the server it only gets generated when you try to use the command block
|gamemode||integer (0-2)||0||Defines the mode of gameplay.
|generate-structures||boolean||true||Defines whether structures (such as NPC Villages) will be generated.
|generator-settings||string||blank||The settings used to customize Superflat world generation. See Superflat for possible settings and examples.|
|hardcore||boolean||false||If set to true, players will be permanently banned if they die.|
|level-name||string||world||The "level-name" value will be used as the world name and its folder name. You may also copy your saved game folder here, and change the name to the same as that folder's to load it instead.
|level-seed||string||blank||Add a seed for your world, as in Singleplayer.
|level-type||string||DEFAULT||Determines the type of map that is generated.
|max-build-height||integer||256||The maximum height in which building is allowed. Terrain may still naturally generate above a low height limit.|
|max-players||integer (0-2147483647)||20||The maximum number of players that can play on the server at the same time. Note that if more players are on the server it will use more resources. Note also, op player connections are not supposed to count against the max players, but ops currently cannot join a full server. Extremely large values for this field result in the client-side user list being broken.|
|motd||string||A Minecraft Server||This is the message that is displayed in the server list of the client, below the name.|
|online-mode||boolean||true||Server checks connecting players against minecraft's account database. Only set this to false if your server is not connected to the Internet. Hackers with fake accounts can connect if this is set to false! If minecraft.net is down or inaccessible, no players will be able to connect if this is set to true. Setting this variable to off purposely is called "cracking" a server, and servers that are presently with online mode off are called "cracked" servers.
|pvp||boolean||true||Enable PvP on the server. Players shooting themselves with arrows will only receive damage if PvP is enabled.|
|query.port||integer (1-65534)||25565||Sets the port for the query server (see enable-query).|
|rcon.password||string||blank||Sets the password to rcon.|
|rcon.port||integer (1-65534)||25575||Sets the port to rcon.|
|server-ip||string||blank||Set this if you want the server to bind to a particular IP. It is strongly recommended that you leave server-ip blank!
|server-port||integer (1-65534)||25565||Changes the port the server is hosting(listening) on. This port must be forwarded if the server is hosted in a network using NAT (If you have a home router/firewall).|
|snooper-enabled||boolean||true||Since 1.3 pre-release, sets whether the server sends snoop data regularly to http://snoop.minecraft.net.
|spawn-animals||boolean||true||Determines if Animals will be able to spawn.
Tip: if you have major lag, turn this off/set to false.
|spawn-monsters||boolean||true||Determines if monsters will be spawned.
This does nothing if difficulty = 0 (peaceful) Unless your difficulty is not set to 0, when a monster can still spawn from a Monster Spawner. Tip: if you have major lag, turn this off/set to false.
|spawn-npcs||boolean||true||Determines if non-player characters (NPCs) will be spawned.
|spawn-protection||integer||16||Determines the radius of the spawn protection. Note: Setting this to 0 will not disable spawn protection. 0 will protect the single block at the spawn point. 1 will protect a 3x3 area centered on the spawn point. 2 will protect 5x5, 3 will protect 7x7, etc. This options is not generated on first server start and appears when first player joins.|
|texture-pack||string||blank||Server prompts client to download texture pack upon join. Put web url link to the texture pack you want players on your server to download in this space. IMPORTANT: This link must be a direct link to the actual texture pack .zip file. Also, this does not patch clients for hd texture packs, although you can place a link for a hd texture pack and it will still download. You should find a 16x16 texture pack if you want the majority of your non-patched player to be able to use this texture pack.|
|view-distance||integer (3-15)||10||Sets the amount of world data the server sends the client, measured in chunks in each direction of the player. It determines the server-side viewing distance. The "Far" viewing distance is 9 chunks, sending 441 total chunks (the amount of chunks that the server will load can be seen in the debug screen).
10 is the default/recommended. Tip: if you have major lag, reduce this value.
|white-list||boolean||false||Enables a white list on the server.
With a white list enabled, users not on the white list will be unable to connect. Intended for private servers, such as those for real-life friends or strangers carefully selected via an application process, for example.