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" or "minecraft-bedrock-edition" tag.

Filter by
Sorted by
Tagged with
1
vote
1answer
4k views

How can I fix “expected '{' as first char” in my testfor command?

How do you use the testfor command to detect if a player has a certain score?! I tried, /testfor @a [score_A_min=10] but it says, "expected '{' as first char".
3
votes
4answers
16k views

How to test for time of day with command block in Minecraft

I'm trying to setup something similar to the MindCrack team's current server set up for my single player world so that the world border expands slowly as I play the game. I already know how to work ...
3
votes
6answers
45k views

How do I spawn potions with Command Blocks?

I want to get super speed, like a speed III for 1:00? I want it to be a splash potion that spawns from a command block, I know it can be done, since potions are entities.
1
vote
3answers
8k views

Rain arrows in random positions within bounds? [duplicate]

How do I summon arrows from the sky in a random position but at the same time to be inside the coordinates that I want? For example, if I use the following, will that summon an arrow in that position?...
4
votes
1answer
3k views

Bukkit Commands In Command Blocks

I'm running a Bukkit server, on which I am trying to use Command Blocks to run commands. In one Command Block, I have tried to use save-all, but when activated, nothing happens The command sudo works,...
1
vote
0answers
49 views

Minecraft - Can't use the new naming system [duplicate]

I've had multiple problems with commands all involving the new naming system. It just won't work. Only the IDs will. For example, if I were to try /scoreboard objectives add snow stat.mineBlock....
0
votes
2answers
2k views

Minecraft Scoreboard stat.mineBlock won't work?

So I wanted to set up something that uses stat.mineBlock.snow, but it wouldn't work. I tried other stat.mineBlock, but they wouldn't work either. I did the command /scoreboard objectives add snow stat....
2
votes
4answers
6k views

Using Command blocks to track a specific player's player kills

I'm trying to get command blocks to track ONLY one specific player's kills, specifically player kills. So far I have tried: /scoreboard objectives add Kills stat.playerKills /testfor EpicMinecartz [...
4
votes
1answer
5k views

If I set up a world border, does it apply to all dimensions?

I am tempted to set up a world border in Minecraft but I don't want to be limited in the Nether. Does the world border effect all dimensions? If it does can it be configured not to?
2
votes
1answer
2k views

Can command blocks look for a block in an area

Can a command block look for a block in an area and not a specific pattern of this block but weither its there or not? I whould assume that you could use /testforblocks for this but I couldent figure ...
6
votes
1answer
858 views

Command Blocks vs Bukkit Plugin, Performance?

I am currently building an open world minecraft adventure map, primarily focused around compatibility for public multiplayer minecraft server. I would like to create events such as; spawning mobs when ...
2
votes
2answers
756 views

How to test if someone died twice and then put them in creative with invisiblite x in command blocks

I am doing a minigame map, and there are a couple events I want to set-up: If someone dies twice they will be eliminated and put into creative with invisibility X If all of a persons wool is captured,...
2
votes
1answer
26k views

minecraft command block testfor certain player

I am trying to make a command block that when powered, it will looks for a specific player in a 5 block radius of the command block. I tried /testfor @p[r=5][name=<name of player>] but it ...
1
vote
1answer
494 views

Does the /clone command save NBT dat?

I've been working on a small Minecraft map that uses the /clone command to copy command blocks to certain locations and I was wondering, does the /clone command save the NBT data of command blocks?
3
votes
2answers
14k views

Minecraft Lan Commands

My aunt and I were playing on her LAN World and she put on commands/cheats for both of us and I tried some commands I know and it said you don't have permission to do this and I did /help and the only ...
9
votes
1answer
167k views

how do you make commands not show up on the chat

I am making a server, and I put a comparitor clock down to constantly have clear weather. How do I silence the commands?
2
votes
1answer
489 views

minecraft command block /setblock is innacurate

I notice when I use command blocks and /setblock, i will always have to subtract the x-value by 1 for it to go in the correct place when i check where the coordinates for the block i want to be set. ...
6
votes
3answers
5k views

How can I receive a success output signal from command block on a fill clock?

I have a setup like this: In which the yellow command blocks are a standard 20Hz /fill clock, and the blue is a command such as, for example: /spreadplayers ~ ~ 10 20 false @p[r=5] My problem, ...
6
votes
4answers
81k views

Check if player has item, if so remove it

I'm messing around with command blocks, and I'm wanting to try and make an XP vending machine. My idea is if you click a button with a Diamond in your hand, 1 diamond gets removed and you get x amount ...
2
votes
1answer
693 views

How do I set up command blocks to teleport the winning team?

Summary: I am making a mini game in Minecraft where you kill the other teams which you can select from either a wolf or ocelot (it's already tamed). Question: How can I set it up to teleport all the ...
2
votes
4answers
949 views

Use a command block to “Sense” a player in a certain area

On my friends and my server, we have a skyblock map. My issue is when somebody joins they spawn above the Void. What I need is for a command block to determine if a player is near the Void and send a ...
5
votes
4answers
60k views

How do I craft command blocks?

I went to my friends house, and he was playing Minecraft on the PC. He showed me a command block, but when I went home and opened Minecraft pocket edition, I went to the crafting table but I could not ...
-4
votes
1answer
833 views

How can I show the leader's health of each team and make it say the other team won

I'm making a Minecraft mini-game called "Clan Wars". You have to try to kill the other team's leader then you team wins! The problem is I would like the scoreboard to show the leaders' health and ...
0
votes
3answers
3k views

How can I make a fake name when I use command blocks?

I'm trying to make a mini game but I want it so that when you press a button over a command block it will say "BOB welcome", so 'bob' instead of the @a or @p sign and then followed by the message. All ...
6
votes
3answers
44k views

Is there a way to display a player name in /tellraw command?

like the title says, I'm looking for a way to display a player name in a /tellraw command which is run by a command block. Example: /tellraw @a {"text":"","extra":[{"text":"A player has won the game!"...
0
votes
1answer
1k views

Execute command relative to block

Is it possible to execute commands relative to a block? For example, if I have a stone block and I want to execute a particle command at it, how can I do that? I do know how to use the execute command,...
2
votes
3answers
14k views

How to use a command block to welcome new players on a server in Minecraft?

Ok, so me and my friend own a server, it uses Minecraft 1.6.4. What I can't seem to figure out, is how to welcome new users to the server by saying Welcome USER To Northwood, when they join.
-1
votes
1answer
504 views

minecraft help with commands

If I make teams with command blocks how do I make the command blocks divide up the teams evenly. Another thing is how do I make it check if there's one team alive. Example: Blue and red Blue is ...
4
votes
2answers
14k views

How to testfor blocks not people

how do I testfor blocks? like if I put down stone near a command block with a comparator attached to it and it will activate a piston connected by the comparator on the command block? please answer.
4
votes
1answer
482 views

Minecraft Arrow Targets [duplicate]

I'm Trying to make a door that opens when you shoot an arrow in the middle, but I can't find a way to add coordinates to the parameters. Is there a way? (the current working command is /testfor @e[...
1
vote
1answer
965 views

Inflict damage when player is hit by minecart

Is it possible to test when a player gets hit by a minecart, then inflict damage on the person hit by the minecart based on the speed of the minecart? If testing for the speed of the minecart isn't ...
4
votes
3answers
6k views

What is the command to make a command block emit a redstone signal after 20 mins [duplicate]

How can I make a command block emit a redstone signal after 20 mins. I want it to emit a redstone signal after 20 mins to power another command block that will have /tp to send all players to a ...
3
votes
1answer
180 views

Teleporting certain people

I am creating a server were there is a jail. I need to have certain people (cops) be able to shoot them or something like that and be teleported to the jail. I just don't know how to make this work. ...
18
votes
2answers
86k 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. ...
1
vote
2answers
46k views

Summoning PrimedTnt with custom fuselengths

How can I summon PrimedTnt with a custom fuse length? I know I have to add some attributes to it, but I'm not sure as to how I can do that. Does anyone know? Also, is there a way to turn TNT explosion ...
1
vote
3answers
12k views

Execute fill command relative to player

How can I execute the fill command relative to the player? If you are wondering why I am asking this, and for more information, reference my earlier question here: How to make a block disappear after ...
9
votes
2answers
7k views

How to make a block disappear after a certain period of time

So I am making a 'magic trail', which is essentially wherever you walk and jump, a block will be placed below you. Unfortunately, the trail will always stick around and never go away. After a while ...
3
votes
2answers
733 views

Making a command block with a command block [duplicate]

I am trying to make a spaceship that can go up and down basically. When it goes up, I want the command block to have a command. That's where I ran into a problem; I couldn't find a way to move a ...
1
vote
5answers
18k views

How to make a command block say something only once in Minecraft?

I am creating an adventure map and needed to know how to make a command block only say something once in the chat menu. PS: I would like this to be under my floor because it is supposed to be an NPC ...
16
votes
8answers
32k 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 ...
0
votes
3answers
5k views

Giving player extra hearts

Is there a way that I can give a player extra hearts? For example, if you've ever played mineplex hunger games, you know that you get 8 extra hearts to start out with. Is there anyway I can acheive ...
0
votes
1answer
1k views

Freezing all mobs, testing for a player in a boat, then unfreezing all mobs

Is there a way that I can freeze all mobs using a command, then test for a player getting on a boat, then unfreeze all the entities? If you are curious as to why I would be wondering this, here is a ...
2
votes
2answers
16k views

Can i use the /testfor command to check for certain words in chat?

I want to be able to detect if a certain word in chat is said like: Console: Please say yes to be teleported or no to remain Player1: yes Player1 teleported to [insert random coordinates here] ...
7
votes
1answer
6k views

Using a command to test when a player eats something [duplicate]

Is there some kind of command that I could use to test when the player eats something, then after the player has eaten that thing, give them 2 hearts? I have a feeling it might be a testfor command.......
-4
votes
1answer
877 views

Is the /explode cheat real

I was looking up cheats for minecraft and found a cheat that exploded yourself (\explode) Next time I played I tried it and it didn't work all it said was Unkown command. Try /help for a list of ...
3
votes
3answers
36k views

How to use setblock command for placing stone button on the left side of the command block

I tried to use the command setblock ~1 ~ ~ stone_button but then it places a button on air. I'm running Minecraft 14w11b snapshot from the 1.8 snapshots. Does someone know how to fix this? Pictures ...
1
vote
2answers
5k views

Using scoreboard objectives as arguments for commands

Is there any way to use scoreboard objectives as arguments for commands? For example, say I have a command block that should teleport a player to a location based on their score. tp Notch ...
24
votes
3answers
31k 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 ...
12
votes
7answers
21k 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?
3
votes
7answers
182k views

How do you apply potion effects to players?

I'm developing a minigame server. I just need to know what commands to use, via command block, to give players special effects infinitely such as: speed boost, regeneration, or jump boost. I know it's ...