Questions tagged [minecraft-commands]

Anything related to the usage of commands, command blocks and functions in the Minecraft game series. If you're building a redstone device without commands, use the [minecraft-redstone] tag instead. Always use this tag together with the [minecraft-java-edition], [minecraft-bedrock-edition], or [minecraft-education-edition] tag.

Filter by
Sorted by
Tagged with
45 votes
2 answers
1.7m views

Keep items in inventory on death in Minecraft

I once played a vanilla Minecraft adventure map (called "Herobrine's Mansion") that prevented the player from losing their items on death. Which commands can be used to prevent the player from losing ...
user avatar
43 votes
1 answer
6k views

What are the basics of commands in Minecraft Java Edition?

What are the basics of Minecraft commands? If I were to start from scratch, with no knowledge on the topic, what are some things that I need to know?
user avatar
  • 2,425
36 votes
3 answers
9k views

Is it possible to detect a player consuming food items?

The idea is that a certain number of random people on the server are identified to have a food allergy - let's pick wheat for an example. Then, when those players eat any item that contains wheat (...
user avatar
  • 1,189
29 votes
5 answers
241k views

Is it possible in Minecraft to switch over from survival to creative in single player?

This question is regarding the minecraft Beta 1.8 prerelease -- I have a beautiful house in single player survival which I'd like to record while flying. I want to be able to change the game mode of ...
user avatar
  • 538
28 votes
4 answers
136k views

What does turning off mob griefing actually do?

In Minecraft, there are several commands that can be employed to make the game a little easier, without actually affecting the difficulty, such as /keepInventory and /mobGriefing. However, what does /...
user avatar
  • 40.1k
25 votes
3 answers
7k views

How do I fix 'Invalid JSON' errors?

I've been at this for almost two hours and no one seems to have the same problem as I and I doubt this will be solved but I'll try anyway. this is the code /tellraw @p ["Would you like to teleport?",...
user avatar
  • 281
25 votes
3 answers
41k views

I have little fighting skill. How can I get rid of a Wither?

I have set up a Minecraft server for my 5-year-old son and a friend of his. They use it in creative mode to build stuff. Today, my son copied instructions he saw in a YouTube video and created a ...
user avatar
  • 375
20 votes
6 answers
16k views

How do I kill mobs using /kill without them dropping loot?

I have a spawn area I am hoping to make a safe haven, so I have a command block on a clock that kills each hostile mob type. This works to keep the place free of any hostile mobs, however every night ...
user avatar
  • 14.1k
20 votes
3 answers
783k views

Teleport to spawn in Minecraft creative mode

When in Minecraft creative mode, there are times when I need to return to the spawn point. Are there any commands (in vanilla Minecraft) that you can use to quickly teleport back to spawn?
user avatar
20 votes
2 answers
44k views

Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition?

This question was split into different questions for each workaround. See these two meta posts for more information. Can you use NBT tags in commands? I’ve tried commands that normally work in Java ...
user avatar
19 votes
4 answers
300k views

How can I replace all blocks of one type with a different type of block, within a certain region?

I'd like to be able to select a region, either with an outside graphical utility or command line, or with native Minecraft commands, and be able to replace all blocks of one block type with another ...
user avatar
  • 53k
19 votes
5 answers
131k views

Is there an SMP Server Command to change weather conditions? [duplicate]

The latest version of Minecraft (1.5) brings, among other things, a number of different weather conditions. Most of these annoy me to no end. I tend to spend a lot of time playing on an SMP server, ...
user avatar
  • 24.7k
19 votes
2 answers
5k views

How can I fix "unbalanced brackets" in my data tag?

Often, when making a command block contraption, you need to set an entity's data tag. These tags can sometimes be very long, with many layers of nested curly and square brackets. For example, this is ...
user avatar
  • 17.1k
18 votes
1 answer
589k views

What are all the gamerule commands in Minecraft?

I want to know what are the gamerule commands in Minecraft, and what do they do? I want to have special stuff without using mods and plugins!
user avatar
18 votes
3 answers
108k views

How can I make a block only be placed on certain other blocks

I want people to only be able to place TNT on only Quartz Blocks and I've see this done before where you can only place blocks on certain other blocks but I'm not sure of the command used to do that. ...
user avatar
18 votes
2 answers
109k views

How to disable command block logging into the log files in minecraft

Hi, I have a single player world which is opened to LAN to let my friends play while I am AFK. I have a lot of command blocks running in that world and those commands are all logged in the log files. ...
user avatar
  • 319
17 votes
5 answers
653k views

How do I use the /kill command to ONLY kill mobs?

I have a Redstone Power loop that connects to a Command Block that is set to kill all entities except for myself (/kill @e[type=!Player]), because I'm building a creative map, but don't want slimes ...
user avatar
  • 1,338
17 votes
4 answers
19k views

How can I block people from my Minecraft world?

Every time I open my world to LAN, people join and start destroying stuff. I want to ban them, but every time I ask someone for help they can't ban them.
user avatar
  • 179
17 votes
9 answers
40k views

How do I select all but two types of entities in Minecraft with the type selector?

I've asked this question towards a developer for Minecraft and I thought I'd ask here too since they might not see the question. How do I select all but two types of entities in Minecraft? For ...
user avatar
  • 1,274
17 votes
1 answer
3k views

Where can I quickly get a list of all Minecraft blocks?

The title may be a bit unclear so let me explain a bit better; I want a list of every block currently in game for a datapack I'm working on. To be clear which way I want them: acacia_button ...
user avatar
17 votes
1 answer
16k views

How do I make a setblock or a fill clock?

Often, when asking about command block contraptions, people suggest using a "setblock" or "fill" clock? What are those and how do I make them?
user avatar
  • 17.1k
16 votes
2 answers
11k views

How can I break blocks remotely?

I want to break blocks far away (e.g. A piece of glass 50 blocks away) with commands, but I don't know if there's any way. Is it possible to break a block (literally break a block, which means with ...
user avatar
  • 4,746
16 votes
5 answers
493k views

How do you enchant and name items with /give using command blocks?

How do you enchant and name items with /give using command blocks?
user avatar
15 votes
2 answers
5k views

How can I prevent players from having a specific item in their inventory?

My brother has a problem with hooking people with fishing rods instead of focusing on survival. I know about the /clear command, but command blocks are only active when the chunk they're in is loaded, ...
user avatar
  • 377
15 votes
3 answers
170k views

Syntax to add multiple commands to a single command block

I am looking to try and set multiple commands in a single command block, but so far everything I have tried just returns "Unknown Command". What is the format for writing multiple commands in a ...
user avatar
  • 40.1k
15 votes
1 answer
4k views

What's the difference between tp and teleport?

Snapshots for 1.10 introduced teleport command feature for /execute. What is its difference to the current tp? I heard it has something to do with "relativity" (~)
user avatar
  • 1,062
14 votes
1 answer
106k views

Custom names and lores in Minecraft 1.7.2?

I have heard it was possible to change the names and lores of Minecraft items WITHOUT the use of third-party programs like MCEdit. Given the things that my friends have told me, and from the ...
user avatar
  • 501
14 votes
8 answers
31k views

How can I use Command Blocks to keep players from placing blocks on a vanilla server?

I want to know how to keep players from placing blocks in a certain area on my Minecraft server using Command Blocks. I already know how to keep them from breaking anything via [effect player 'mining ...
user avatar
14 votes
2 answers
2k views

Why remove redstone dust from my command block contraptions?

Whenever I show my command block contraptions to my friends, they always comment that I should remove the redstone dust from them. They say it causes lag and that redstone can be unpredictable, but I'...
user avatar
  • 16.2k
14 votes
9 answers
11k views

How to add an enchantment onto held item in Minecraft with command blocks

I want to have a button to enchant a piece of armor in my hand with Unbreaking V, if and only if: The tool is already enchanted witch has Unbreaking III The player has a minimum of 30 levels I tried ...
user avatar
13 votes
4 answers
68k views

How can I easily find structures in Minecraft?

I would like to find and explore some Minecraft structures, like Temples, Dungeons and more. My current way if finding these is to go straight and look around while walking. This isn't very efficient, ...
user avatar
  • 6,538
13 votes
2 answers
812k views

How do you clear all item drops in Minecraft?

How do you clear all item drops in Minecraft? I want to have something activated by an Item landing on a golden pressure plate, but It can only be activated once. Is there any command block command ...
user avatar
  • 313
13 votes
7 answers
32k views

I've lost a command block, how can I find it?

I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it?
user avatar
  • 195
13 votes
4 answers
5k views

Detect where a specific player died?

So I am making a capture the flag game. I have a objective for picking up the flag: scoreboard objectives add red_flag stat.mineBlock.minecraft.wool Has the red flag I want it so that when a player ...
user avatar
  • 861
13 votes
2 answers
14k views

How to delay or loop commands?

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A: How do you either activate a command x ticks/seconds/minutes/...
user avatar
12 votes
2 answers
2k views

Can online servers read my /minebot commands?

I have a mod on my game (1.7.10), which allows me to automatically kill animals, mine and farm. To activate it though, I must type in /minebot kill or /minebot plant wheat Can the online server ...
user avatar
12 votes
4 answers
28k views

Seconds to ticks conversion

I am building a fnaf map for me and my friends to play, and need to convert seconds to ticks. I read on the wiki that a night is 8m 36s, which is 516s altogether. I want to convert 516s to game ticks....
user avatar
12 votes
4 answers
61k views

How To Make Clickable Text In Minecraft

I am trying to make clickable text in Minecraft in the chat box. It was used in the adventure map, "UP". The idea is that you are given an option in the text to click, "Yes", or "No". Each word will ...
user avatar
  • 489
12 votes
2 answers
28k views

What commands are counted as 'cheats'?

When making a new world, on the screen where you can turn on the Bonus Chest, Structures etc. you have a button for turning on Cheats. Now I know the command /gamemode <mode> [player] can not ...
user avatar
  • 15.4k
12 votes
4 answers
19k views

Can I use command blocks to teleport a player who died?

I need to detect if a player has died and teleport that one to location XY and give the other team a point. I can detect if a player has died with testfor @a[score_HEALTH=1] applied to a redstone ...
user avatar
  • 545
12 votes
1 answer
71k views

Using /setblock, how do I set a command block with a prefilled command?

Using /setblock, I'd like to set a command block with a command already pre-filled inside of it. My current code looks like this, but it doesn't seem to work: setblock <x> <y> <z> ...
user avatar
  • 297
12 votes
5 answers
7k views

How would I make something spawn when and where a snowball hits something? [duplicate]

I know how to make things spawn as they follow an object, but is there any way to make them spawn once lets say a snowball hits its target? I am working on a way to make snowballs that spawn tnt upon ...
user avatar
12 votes
3 answers
177 views

How can I get an enchanted item that cannot be used in a grindstone?

I'm trying to create a joke item (a book with quick charge 32k). This item should be completely useless. I know a way of making the book "too expensive" to apply in an anvil in survival mode,...
user avatar
  • 123
11 votes
5 answers
65k views

Can I have extra minecraft inventory?

Can I have extra Minecraft inventory in vanilla Minecraft? I have seen mods be able to do this but never in vanilla Minecraft. Is there some way for me to carry more. Maybe a command that allows ...
user avatar
  • 3,762
11 votes
2 answers
274k views

How do I give players already enchanted Tools/Armour/Weapons

I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons. I'm not sure if you can ...
user avatar
11 votes
2 answers
1k views

Is it possible to make a Player go only backwards?

I'm making an Adventure map (it has loads of command blocks), but I got stuck: How can I make a Player to be able to go only backwards, that is, only when pressing the 'backwards' key, and to be ...
user avatar
  • 6,538
11 votes
2 answers
42k views

How do I spawn wolves?

How do I spawn wolves in singleplayer Minecraft using Single Player Commands; what command do I use?
user avatar
  • 139
11 votes
4 answers
19k views

Is there a way to set an "Adventure Mode Boundary" in Minecraft?

Is there a way to set an "Adventure Mode Boundary" in Minecraft? I am trying to create this village where players can spawn in, and then set out to explore the world and build and do normal minecraft ...
user avatar
  • 111
11 votes
2 answers
14k views

Cross-dimension teleportation using command block or datapack?

Is it possible to teleport a player in coordinates in another dimension? If not, is it possible using a datapack? I'm using MultiVerse with 1.14 but their portals plugin is broken. I tried to use a ...
user avatar
  • 551
11 votes
2 answers
5k views

Minecraft command block logging

I had just updated my friend's minecraft server to the beta build of bukkit (1.4.6 R0.1). This restored all of the plugins that weren't available when it was vanilla. However, the internet (and its ...
user avatar

1
2 3 4 5
98