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
2
votes
2answers
88 views

Teleporting player around a corner that face a specific direction

I want to build some kind of non euclidian room in minecraft, where a player should be able to go 2..infinite amount of times around a corner, until he went full cyrcle. But it should only work in one ...
0
votes
1answer
24 views

Fill blocks when someone dies in minecraft

So, I am playing with my friend. For a few days, we have been working in a PVP arena. I also decided that I would use commands to do so. I would have a wall to separate the two players and when they ...
-1
votes
2answers
26 views

Clear the other persons inventory when they die?

I am playing with my friend, and I want to create a PVP arena. I have built it and added a screen to tell you when to start, and also give you your PVP items, so I am trying to clear the other person'...
8
votes
2answers
139k 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 ...
0
votes
1answer
65 views

Select teams using /tellraw command?

I would like to know if it possible to use teams with the tellraw command. I know that you can use it to select players (e.g. /tellraw @a {"text":"","color":"blue","extra":[{"selector":"@p"},{"text":"...
-1
votes
2answers
19 views

How to get rid of command feedback in minecraft ps4 1.16

Its a simple question I've tried /commandfeedback false
3
votes
1answer
3k views

Replace empty crossbow with custom firwork loaded crossbow?

I've made a repeating command block that replaces an empty crossbow in your hand with one loaded with a rocket. Thus, when you shoot the crossbow it instantly replaces it and "loads" the crossbow for ...
4
votes
1answer
946 views

How do I give a player an item with custom properties?

I'm used to creating Java Edition Minecraft maps, where NBT can be used to set many different block, item, and entity properties, like an item's CanPlaceOn/CanDestroy list, a chest's items, and more! ...
0
votes
1answer
15 views

java commands arent working after following a tutorial

I copied a command from McStacker, put it into a command block and it never works (i am on the correct version and i am op). why doesnt this work for me? i have watched tutorials on youtube and made ...
1
vote
1answer
269 views

Help using /fill command with NBT tags on spawners in 1.14

I'm working on a mob grinder, and have some spawners I need to place. However, I'd like the player diatance tag to be 1000, instead of the usual 16. I know it should look something like this: /fill ...
0
votes
1answer
20 views

Tracking Kills/Deaths in Minecraft Bedrock

Since Bedrock only has dummy scoreboards, I'm trying to use command blocks to update the scoreboard. Is there a way to use /testfor or another command to look for stats like Death? are stats even ...
17
votes
2answers
29k views

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

This question was recently 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 ...
0
votes
2answers
27 views

Get head from world coordinate and give it to player

I have placed multiple heads with different skin but same player name. I'm doing this because I can't afford multiple minecraft accounts. How do I get the head and give it to player inventory using ...
1
vote
2answers
13k views

How can I test for a player wearing specific armor?

How can I test for a player that is wearing an iron helmet named "test1" and an iron chestplate named "test2" in Minecraft Version 1.12?
3
votes
1answer
564 views

Testfor a written book in 1.8 with custom name and writing

So I’m working on a map and need help with the Testfor command. I’ve looked around and tried out several different things and just messed around with the command without help, but I can’t get it to ...
1
vote
1answer
49 views

Would it ever be possible to convert Python to Minecraft command blocks?

I know this might sound stupid but I'm honestly curious. Would this ever be possible? Or is Minecraft's language too basic. Would I ever be able to write python, then run it in Minecraft?
4
votes
1answer
843 views

How do I summon a baby mob?

In Minecraft Java Edition, one can summon baby zombies and drowned using the IsBaby NBT tag: /summon zombie X Y Z {IsBaby:1b} Likewise, one can summon baby breedable mobs (Pigs, Cows, etc.) by giving ...
3
votes
1answer
34 views

How To Automatically make particles when a player Joins Using Commands On Minecraft Bedrock Edition

I am attempting to make a kit PVP on Minecraft and I'm trying to make particles when a player joins the server.
1
vote
1answer
24 views

Is it possible to teleport armor stands above specified items?

I'm making a map and I have items randomly appear on the ground. I'm trying to make armor stands teleport to above the items to act a as a beacon. Is there any way to do that? I've tried looking at an ...
0
votes
4answers
85 views

How do I kill a slime without it splitting?

Slimes are notoriously known for being able to split into smaller slime when killed. This happens in both editions of Minecraft, Java Edition and Bedrock Edition. I’m making a map where a slime is ...
1
vote
0answers
22 views

How do I make command blocks distinguish between an in ground arrow and in ground tipped arrow?

I know how to make explosive arrow, but I want to have only strong harming arrows explode; the command is: execute at @e[type=minecraft:arrow,nbt={inGround: 1b}] run summon tnt ~ ~ ~ I have tried to ...
1
vote
1answer
37 views

How do I make people able to hear a sound played using commands regardless of where in the world they are?

I'm making a map. i am trying to use the /playsound command. There is going to be a boss battle at the end, and I need my music disc to play. I know how to play a sound, but I want it so people can ...
2
votes
2answers
31 views

Custom Minecraft 1.8 spawners

I am working on a minecraft 1.8 server and am trying to make a mob spawner that spawns items. This example:How can I make a spawner that summons Items? works on new versions of minecraft but not on 1....
-1
votes
1answer
19 views

Minecraft 1.12.2 How to /clear item that have a specific enchant and name

I've seen examples of how to clear items with specific name or enchants but not both. This is what I have so far: /clear @p minecraft:paper 0 1 {tag:{ench:[{id:16s,lvl:1s}]}},{display:{name:"...
11
votes
5answers
5k views

Automatically running a Minecraft command

Is there a way to automatically run a Minecraft command when starting a new game, loading an existing world, joining a server, or re-spawning? For example, is there a way to automatically enable ...
3
votes
2answers
158 views

How can I make a spectator mode in Bedrock Edition via Commands?

Java has a game mode titled "Spectator" where one view the world as a ghost-like form, going through walls and able to "possess" players' bodies and see what they would see on ...
1
vote
1answer
72 views

Execute as selector if nearest entity has a tag

I want to execute a command to an armor stand if the nearest pig has a specific tag. The commands that I have tried so far... execute as @e[type=armor_stand] at @s if entity @e[type=pig,limit=1,sort=...
6
votes
3answers
49k views

How can I make the compass point to a player?

I want to make a hunting Minecraft map, and each hunter has a tracking compass that points to the nearest player. My friend said that I need a plugin or mod (I don't know what a plugin is!). The ...
0
votes
1answer
6k views

How do I teleport a player to a random position?

I need a random number from -100 to 100 for a command block /tp @p (random number 1) 200 (random number 2)
4
votes
2answers
35 views

Minecraft: can I get filled in maps using command blocks?

I don't mind cheating in my single player survival world. But I used kill all entities while filling a large chunk with air to get rid of the mobs. But I didn't know item frames are also entities. Why ...
1
vote
1answer
732 views

Help Minecraft 1.14 pre-release 5 commands

I got bored of Minecraft so this is what I'm doing for a solution. The command in theory is supposed to slow me down whenever I touch air. The command I am trying is the following: /execute if block ...
1
vote
1answer
55 views

How do I give players a potion effect when they reach a certain XP level?

I want to give players swiftness when they reach level 10. Then when they get to 20 they get another effect then 30 and 40 and so on I just don’t know how to do it.
-1
votes
1answer
37 views

Minecraft 1.16 – My “display:{Lore:”“}” doesn't load

My "display:{Lore:""}" doesn't load, I think it's too big for Minecraft. If you play on Hypixel's Skyblock, you know the Aspect Of The End. I've recreated it in Minecraft Vanilla. ...
1
vote
1answer
60 views

How to detect the death of a mob (minecraft 1.16)?

I am making a custom adventure map and there is an evoker bossfight (named "lunatic cultist"). I wanted to check when it died, but none of the tutorials I found actually worked (probably ...
2
votes
1answer
37 views

Hiding team colors in usernames

I'm working on a minigame in Minecraft that is built upon not knowing what role other people are (kind of like a social deduction game). However, since teams are required for the game to function, a ...
2
votes
1answer
30 views

Why does /execute store refuse to update an NBT number when provided with a scoreboard value?

Here are some commands for you to try in MCJE 1.16. Run the following commands in the chat: Set up a scoreboard objective. (or use an existing test objective if you hate piling them up, like me) /...
-2
votes
1answer
30 views

Playsound in the position of the mob that executes?

I would like to run the /playsound in the position of a creeper named red, but it doesn't seem to target mobs, is there a way around this? Maybe using the execute subject? execute at @a as @e[type=...
0
votes
1answer
45 views

Is it possible to change part of the NBT of a held item?

As the title says, I'm wondering about whether it is possible to change part of an NBT or add NBT to an item that a player is holding. My goal is to make custom enchants. For example when a player ...
1
vote
1answer
26 views

How to not allow people to take items out of chest (Bedrock)

I want to have a chest where other players are able to look at the contents of a chest but I don't want them to be able to take the items out. Is this possible to do with command blocks? I am playing ...
1
vote
1answer
87 views

Is there a way to make a kill cooldown in Minecraft?

I am building a murder mystery type map, and I was wondering if there was a way to make a 25-second kill-cooldown. I am giving the murderer team strength 127. I need this to be where when one person (...
0
votes
0answers
50 views

How to make a randomiser in Minecraft [duplicate]

I am trying to make a button that after you click it a bit changes places, but I need this to be random. I also wish to do this with a 3 seconds timer for another project that uses the same mechanic. ...
2
votes
1answer
49 views

Any way to align an entity to all axises in minecraft bedrock?

I am trying to summon an object and then center it in Minecraft Bedrock Edition. I am trying to just make the coordinate the exact position (eg. 10.0 80.0 10.0 or teleporting to 10 80 10). I have ...
1
vote
2answers
48 views

How to check if entities have the same position

Im making a Snake Game using Armor Stands on the positions of table game and for the body of the snake. I want to check when the the Armor Stand {Tags:["head"]} of the snake has the same ...
0
votes
2answers
640 views

Have a shield spawn in with this mob

Here is the code for the mob: /give @p spawn_egg 1 0 {EntityTag:{id:"minecraft:zombie",CustomName:"EMPERIAL SHADOW GATE GUARDS",CustomNameVisible:1,Health:999,Attributes:[{Name:"generic.followRange",...
9
votes
4answers
42k views

How can I spawn items into a chest, using Command Blocks?

Like the title states, I want to be able to spawn items using a command block, and have them placed into a chest. And I don't want to replace the chest, I want it to just add my block into the chest....
0
votes
2answers
65 views

How do I make a specific scoreboard for mob kills in bedrock edition

I am trying to make a mob arena. The arena is already built obviously. I'm just trying to figure out how to make a working scoreboard for different mobs. I saw a few people mention changing the loot ...
-1
votes
1answer
26 views

My Command blocks are stuck in a certain mode

Every current command block being placed is stuck in impulse.It is also stuck to being always active, and every command is unconditional. So that means no command will work. This is affecting every ...
2
votes
1answer
19 views

How do you detect sneaking in minecraft bedrock?

i am wondering if it is possible to detect sneaking in mc be (Minecraft Bedrock).
1
vote
3answers
48 views

How to use /title in /execute

I've been trying for weeks to solve this problem. I'm using Minecraft Java Edition 1.13.2, and I'm trying to use the following commands in /execute. /title @p times 10 30 10 title @p title {"text&...
1
vote
0answers
26 views

how to store position of a player as a variable?(minecraft java) [duplicate]

I am working on a project in which i need position of a player at any tick. i used the command: data get entity player_name Pos[0] data get entity player_name Pos[1] data get entity player_name Pos[...

1
2 3 4 5
78