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.

Filter by
Sorted by
Tagged with
3
votes
1answer
49 views

How do you use the /setblock command to place down more than one layer of snow

The /setblock command can place the snow layer block like so, /setblock ~ ~ ~ snow_layer, but how do you increase how many layers are placed?
2
votes
1answer
238 views

How to use a block particle in /particles?

version: 1.14.4 java edition I tried:/particle block and /execute at @p run particle minecraft:block, but it didn't work so I tried to find any answers online, but still I couldn't find someone ...
-3
votes
1answer
51 views

Can someone tell me whats wrong with this command? [closed]

execute if entity @s[nbt={Inventory:[{id:"minecraft:barrier",display:{Name:"\"Break Barricade\""},Enchantments:[{id:protection,lvl:1}]}]}] run me hi Any Help?
1
vote
1answer
77 views

My /kill @e isn't killing

I'm trying to destroy dropped Oak Planks, and my command is: /kill @e[type=item,tag={id:"minecraft:oak_planks"}] But it doesn't work.
0
votes
0answers
34 views

Minecraft /kill command [duplicate]

I am working on a Minecraft mini game. I need a /kill command to kill all of a specific type of item.
1
vote
2answers
177 views

How to detect a player on a specific block(s)

I'm making a map and I'm trying to separate players by building a wall when ever one crosses a certain point, but I can't seem to get the command block to detect when i'm on something and build a wall....
2
votes
1answer
138 views

How to GET minecraft world spawn with commands?

I would like something opposite to /setworldspawn, a command that would return me current world spawn location. I tried getting SpawnX, SpawnY and SpawnZ nbt data from a non-existing player, but it ...
0
votes
1answer
53 views

How do I change grass blocks within a set region to magma blocks? [duplicate]

I'm wanting to change grass to magma on my Bedrock Edition, Nintendo Switch world to make a Skyblock challenge sort of thing but so far every command I've tried just says "invalid command". Does ...
2
votes
1answer
149 views

Why does this execute and summon command throw an error?

I am trying to summon a lightning bolt when a repeating command block detects an arrow on grass, but every time the command block runs it throws the error: Failed to execute 'summon' on Arrow. I'm ...
0
votes
1answer
213 views

(Java Minecraft 1.15) Tellraw incremental death messages

Recently I have been making a map, I was wondering if an incremental tell raw death message could be applied. What I mean by this is, if you die, chat will automatically say "Death, 1" Next time you ...
1
vote
1answer
30 views

How can I mention a specific name?

Is there a way to make it so a command block mentions a specific person if a scoreboard requirement is met? Someone here yesterday helped me make something that kills everyone if one person dies. I'm ...
1
vote
1answer
158 views

How do I use the “SelectedItem” tag to check for a player in this command?

I am trying to make this command work : /execute as @a[nbt={SelectedItem:[{id:"minecraft:grass_block",tag:{display:{Name:"{\"text\":\"GRASS3x3\"}"}}}]}] run fill ~-1 ~-1 ~-1 ~1 ~-1 ~1 It works when ...
0
votes
1answer
2k views

How do I make it so when one player dies everyone dies

I'm trying to make something like the life link challenge for a realm but can't use a plugin on it so I've been trying to make it using command blocks. it's in 1.14.4 so old commands won't work
1
vote
1answer
43 views

How can I make a command that puts an output when an entity count is above a certain number? [duplicate]

I need an execute command that outputs as 'true' when the number of Iron Ingots on the ground is above 100. I have attempted this in the only two ways I could think of, and so far neither have been ...
-2
votes
1answer
63 views

How to limit the amount of items that spawn in Minecraft Bedwars? [closed]

What command could I use to limit the number of a specific item? For example, the gold that spawns would be limited to 30, even if you left it running (unless you pick it up - then it can spawn up to ...
0
votes
1answer
56 views

How to summon a minecraft mob wearing a chestplate?

I'm trying to summon an army of pigmen for a build, but they wont spawn with chestplates. Every other armor item, but not chestplates! This is the command /summon zombie_pigman ~ ~ ~ {Invulnerable:1,...
-2
votes
1answer
44 views

When I try to use command blocks in Minecraft is there a way to make them not show feedback in chat? [duplicate]

So when I want to use a command block without other people seeing the feedback in chat I don’t know how to do it.
0
votes
3answers
46 views

Help Combining Commands on a CMD Block

I'm trying to make a PVP area on my realm away from the main area using command blocks to teleport to the designated area. However I would also like it to clear the players inventory so they don't get ...
0
votes
0answers
52 views

How to make a clone only replace specific blocks [duplicate]

I'm in Java 1.14.4 and I'm trying to have a clone command that only replaces blocks that are within the block tag #plantable_landmine execute at @e[type=minecraft:armor_stand,tag=landmine,tag=...
-1
votes
1answer
190 views

Command block interaction permission

I am on a bukkit server with my friend. I am looking for a way to make it so he is deop but can still interact with command blocks. Is there a way to do this? I am using PermissionsEx. If there is ...
-4
votes
1answer
196 views

Minecraft bedwars map

I am making a minecraft bed-wars map but I need some help. I need a redstone device that counts diamonds. Every four diamonds it should upgrade the iron and gold generators. (Iron spawns 4 times ...
0
votes
1answer
123 views

Why does kill @e[type=!minecraft:bat] kill every mob

I was tired of the sheer mass of bats I had in my intentionally dimly lit tunnel, so I typed in that command. Then I died. Then I saw that all my pets and animals were also gone. I'm playing in 1.14.2,...
7
votes
3answers
2k views

How do I create indestructible terrain?

How do I make terrain that has not been placed by a player be immune to things? Example: TNT, mining. Also, how do I make blocks that have been placed by a player able to be mined/blown up?
-1
votes
2answers
168 views

How can I make every zombie that I kill spawns me one diamond?

I played on a Minecraft map which had this minigame arena mode where you get diamonds for killing each kind of mob. With these diamonds you were able to buy better equipment until you killed all the ...
0
votes
1answer
183 views

Minecraft any way to use /clone to only replace air blocks?

As the title asks, Is there any way to use the clone command to only replace air blocks, such as breaking a floor and it being replaced by other blocks? I know that this can be done using /fill, but ...
-1
votes
1answer
46 views

Armor Stand state clock 1.13+

I have a Scoreboard dummy objective called 'State', and I have an Armor Stand tagged with 'Game'. How do I make a fill clock that runs when that tagged Armor Stand has a state of '0'? This is my ...
3
votes
1answer
78 views

How to detect 15 to 20 item in minecraft?

In Minecraft, how can I detect five or more item in players inventory? I alraedy know: @p[nbt={Inventory:[{id:"minecraft:cod",Count:5b}]}] But it only works with five item and no more or less.
4
votes
1answer
544 views

Minecraft 1.14 - how detect blocks at some distance from the player

This will be my first question here about some work I would do for a world that I'm creating. Let's jump into the question. EASY MODE I would be able to detect if player is in "range" of a specified ...
0
votes
1answer
45 views

How to test if a mob/animal has been fed? 1.14

I'm trying to test if a fox has been fed sweet berries to execute a command.
-1
votes
1answer
285 views

How to activate a Redstone lamp with a Command block

I'm trying to make a tower of redstone lamps. Is it possible to activate one of them without activating another lamp with a command block, and if there is, what code can I use to connect a Command ...
-2
votes
1answer
42 views

make falling block not drop item if unable to be placed

I want to make falling block not drop item if unable to be placed. If I remember correctly there is a tag for it. I might be wrong if so tell me thx Basically some falling blocks that when summoned ...
4
votes
1answer
34 views

How to detect if a player has no item selected in his hand?

So, in version 1.12 we can easily detect if a player has nothing selected in his hand by just using the nbt {SelectedItem:{}}. I realise that it is no longer working in version 1.13 +. I tried to ...
1
vote
1answer
90 views

Attempting to copy scoreboard to another scoreboard in 1.12.2

Firstly, I have to use Minecraft v1.12.2 for plugin reasons. I need to use a command to copy a scoreboard, but I cant figure what I'm doing wrong. I'm using the command: /execute @a as run scoreboard ...
1
vote
1answer
94 views

How do I make a diamond sword that, when it hits a mob, executes a command?

I have already made a scoreboard objective for "used:minecraft.diamond_sword", but I don't know what to do next.
0
votes
1answer
56 views

How do I teleport a zombie to me every time it gets too far by using a command block?

I want to teleport a zombie to me if it gets too far from me but the command block only does it if the zombie is far from itself. The command I tried is /execute as @p run tp @e[type=zombie,distance=...
-1
votes
1answer
310 views

How to spawn different cat skins in minecraft?

So i want to spawn different cat types in 1.14.4 using the /summon command.. How can i do that? in the new update there are much more cat skins and i would like to know how to summon different skins
0
votes
1answer
76 views

How to force-own Minecraft cats?

I've been having a little bit of a problem with my Minecraft cats. I've tamed them for a long long time and now I used another launcher, because the one I was using was glitching, and I tamed another ...
3
votes
1answer
50 views

So I'm having trouble making a tool (doesn't matter what) that can break certain things. (Bedrock) [duplicate]

When I choose a tool, and I activate the command, it tells me the error is where I put the tools name. For instance, /give @p minecraft:diamond_shovel 1 0 {CanDestroy:["minecraft:dirt"],Unbreakable:...
5
votes
1answer
213 views

Trying to tag an arrow thrown with a specific bow? [1.14.4]

What I'm trying do is tag an arrow thrown from a bow called "TP Bow" so the player that shot the arrow teleports to the location where the arrow landed, then destroying that arrow, but I'm having ...
-2
votes
1answer
55 views

Showing an item name on top of the hotbar without an item?

I want to display a name on top of the hotbar in a specific empty slot, is this possible with commands?
4
votes
4answers
310 views

How to kill people who are standing in the sun?

I'm trying to find a way to make it so when someone is outside during the day they get killed. I've searched for a long time and I've tried many different things, but they end up killing you even if ...
0
votes
0answers
21 views

Is it impossible to add certain NBT tags to commands in PE? [duplicate]

I've read a post that said that you can only add the CanDestroy and CanPlaceOn tag, is that actually true or is there a way to do other things, like getting unbreakable items? Edit: This is not a ...
3
votes
1answer
111 views

How do i summon a villager that trades custom banners

I'm familiar with creating a villager using custom trades with command blocks, however when trying to have a villager trade items for a custom banner, it failed and only summoned a villager that ...
0
votes
2answers
58 views

Command Block Question for “if, then” statement

On the latest version of Minecraft Bedrock edition is it possible to have a command block (When activated) check for the nearest player's name and kill them if it does not add up to a pre-entered name?...
0
votes
1answer
38 views

Deleting Certain Items [duplicate]

I have a Minecraft realm, we made a base inside of an ocean monument but we keep having Guardians spawning. I have a command set up to kill them when they spawn, /kill @e[type=minecraft:guardian] , ...
0
votes
0answers
30 views

scoreboard money show on bossbar [duplicate]

I am using a bossbar to show the money value . This is the repeating command execute store result bossbar money:bar value run scoreboard players get @p money If playerA has 10 money and playerB has ...
1
vote
1answer
50 views

Make a blocks placeable on any blocks in adventure mode with shorter command

I and my friend are making a bedwars map in 1.12.2 . We decided to use adventure mode when play to prevent other players destroy the map , but still have some problem. The tools will use to break ...
1
vote
1answer
96 views

Is there a way to give an enchanted book with a random enchatment level?

So the backstory about this is that we are trying to give a reward out with of an enchanted book with a random level. Aka Protection I-V randomly. I know the command /give @p enchanted_book 1 0 {...
1
vote
1answer
69 views

How do I use a target selector to output the nearest player's UUID?

I want to be able to use a target selector to select all of a player's tamed wolves. It's easy to do that with this target selector: @e[type=wolf,nbt={"OwnerUUID":"<Player UUID>"}] When I try ...
3
votes
2answers
162 views

How could I check if a player is exposed to rain?

I was looking for a way to check if a player is exposed (no roof or anything) for a project and ended up thinking of one, but I failed to create it. I found out that spreadplayer will tp the ...

1 3 4 5 6 7 67