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

Minecraft: determine where a filled map is located (cord range) without having to go there

F3+H turns on tooltips and lets you see the ID (even if you renamed the map) when you hover over the map but I can't find anything that tells where a filled map* is located. I'm trying to understand ...
3
votes
1answer
82 views

How to hide functions from the autofill menu in Minecraft Bedrock Edition?

I'm creating several functions in a behavior pack for Minecraft Bedrock Edition, and I'd like to be able to hide some of them from the autofill/autocomplete menu that lists functions when you first ...
0
votes
0answers
13 views

How do you rotate armor stand limbs specific degrees

I'm trying to rotate the armor stand's limbs by certain degrees but I can't figure out how. Example of intended result: being able to make the arms spin in circles
0
votes
1answer
28 views

How do modified mob's knockback in minecraft?

i really mant to play minecraft with mobs that has 1.000.000 knockbacks, it sounds cool and fun. so how do i can change mob's knockback? need third party app to mod the world or just use commands ...
-1
votes
1answer
31 views

How do I give myself a Netherite pickaxe on Minecraft with high enchantment levels on the 1.17 snapshots?

I know I have to use the /give command, but what do I put after the netherite_pickaxe part? I am using the new 1.17 snapshots.
1
vote
1answer
29 views

Can't firgure out what's wrong with my Minecraft command

I was gonna do a battle with my friends with commands when in my head I thought of a command that will summon a lightning and arrow on a snowball named 'h' I did the command Repeating Command Block 1: ...
1
vote
0answers
16 views

How do I make a player die when they step off a certain block?

I keep finding things for when people step on a block, but I need for when they step off a block. I'm trying to make a command set on 1.16 where if a player were to no longer step on 1 of 2 specified ...
0
votes
1answer
26 views

How to check for minimum amount of items in Player Inventory?

For starters I am aware that a similar thread already exists, however it does not answer my question as well as being outdated. Reference: Testing for a minimum amount of items in a players inventory ...
-1
votes
1answer
29 views

How does the angry_at piglin nbt work?

I am planning to do a manhunt with lots of things as twists (Video title would be:"Minecraft Manhunt but Buttons, Pressure plates, and Trapdoors are OP) so if you hold a blackstone button, it ...
0
votes
0answers
14 views

How to spawn a mob that takes extra knockback regardless the weapon used?

I am planning to do a manhunt with lots of things as twists (Video title would be:"Minecraft Manhunt but Buttons, Pressure plates, and Trapdoors are OP) so if you hold a blackstone button, it ...
0
votes
1answer
26 views

Why is it bad practice to test for item names?

This question is a canonical that can be referenced in future questions with this problem. I've heard that testing for item names and lores in Minecraft JE is bad practice. For example, the following ...
0
votes
0answers
17 views

How to detect if player is wearing specific armor with nbt?

So I am trying to detect if the player is wearing a specific set of custom armor. I have a command that is not working. Here it is: execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:...
0
votes
2answers
33 views

Minecraft java command block reply “you don't have enough money”

I'm making a Minecraft virtual market and, here are my commands for command blocks. First command block: Impulse, Unconditional, Needs Redstone /tellraw @p {"text":"Succesfully purchase ...
0
votes
1answer
26 views

How do you teleport an item using a command block when the item is in a certain spot?

I am making a one block skyblock that is going very well except the items fall off the edge when they shouldn't because a command block should teleport the item to the infinity block, but they aren't. ...
1
vote
1answer
34 views

How do I make a tellraw command say someone's name?

I need help here, I am making a map called "The Firing". I want it to say: Welcome to The Firing, [USERNAME] What I had was /tellraw @a {"rawtext":[{"text":"Welcome ...
0
votes
1answer
25 views

How can I remove the death counter on my server?

I want to remove the death counter at the top of the tab menu and also remove the death counter at the side of the screen. How can I do that?
1
vote
2answers
52 views

How do I make items run commands?

I want to make a carrots on sticks run commands, but I want different carrots on sticks to have different names and run different commands. Is this possible?
1
vote
1answer
27 views

How can I give players custom names?

How can I give someone on my Minecraft server a custom name that replaces their own username in that game?
1
vote
3answers
46 views

How to make a lingering potion stay longer?

Im wanting to make a gas chamber (for my horror puzzle map) and I want to add a lingering potion to stay for ever and do damage is there a way I can do this? I'm fine with using redstone or commands.
0
votes
0answers
34 views

Shuffling items in chest [duplicate]

So I'm playing on my Nintendo switch, and I'll be blunter this time around How do I shuffle the order of items inside a shulker box, or an ender chest? (Basically for a deck)
0
votes
0answers
24 views

Command Keep people off nether roof ONLY

So I was following this tutorial (the answer from randomuser922) How can I block people getting onto the roof of the Nether in Minecraft? which creates a dummy and stores the y value of all players to ...
0
votes
0answers
27 views

Is there way to teleport an armour stand randomly, but only on grass blocks? [closed]

Is there way to Teleport armour stands randomly, but only on grass blocks? I'm on 1.16.
0
votes
0answers
39 views

How Can I Summon A Minecart And Have The Player Automatically Enter It When Spawned In Bedrock?

I am making a rollercoaster and attempting to add a button that makes a command block summon the Minecart onto the tracks and has the player automatically enter it. I am using Minecraft Bedrock (...
-1
votes
1answer
50 views

What is wrong with my command?

I am trying to do a 1 person sleep command in my realms, and my code won't work for one specific line: execute if entity @a[scores={KickBed=1..,}] run execute if score @a[scores={sleep=1..,}] run ...
0
votes
3answers
47 views

How do I add an enchantment to another item that already has some enchantments?

I have a pickaxe with the enchantments Fortune I and Unbreaking I. I would like to add another enchantment, Mending, onto this pickaxe, without disturbing the other enchantments. I think that the /...
0
votes
0answers
28 views

How can I make it to where every player gets an item after killing an entity?

I am using a PC, and was wondering what code to put to make it to where if a player kills a mob, they get a certain item, an example of this would be: Kill a zombie=Get a gold ore Kill a skeleton=Get ...
3
votes
1answer
67 views

How can I programmatically gain XP which both triggers mending and is silent?

I'm working on a special world for my family and friends to play on, but with the twist that all of us have some special ability that makes us superior to the others in a certain field. "Classes&...
1
vote
1answer
75 views

How to do this: (Long Question)

So, I have several commands down, and they are the slightest bit conflicting. /execute as @a[nbt={SelectedItem:{id:"warped_pressure_plate"}}, Dimension:"minecraft:overworld"] in ...
3
votes
1answer
52 views

How to make players cant destroy farmland by jumping on it?

How to make players cant destroy farmland by jumping on it ? I am using java edition 1.16. I need this for my minecraft map where i dont want to players can destroy farmland.
-1
votes
1answer
363 views

Is it possible to create a “ban hammer” tool that bans someone you hit with it?

Is it possible to create a “ban hammer”-like tool that bans the person? Basically what it would do is when you hit people with them ban them from the world. Is this possible?
2
votes
1answer
43 views

How do I remove item lore?

So I want to make a GUI for my server, and there is an item I would really like to use, and that's the banner patterns, they look like scrolls which would really fit with the server. So when I tried ...
1
vote
0answers
29 views

Minecraft (1.13+) - Get Player By UUID using commands

I'm trying to make a commands that give an arrow to the player that fired the arrow. The arrow object has Owner key that contains UUID of the player. Is there a way to select a player with an UUID ...
1
vote
1answer
24 views

Why is my JSON text not displaying anything?

I understand that to display a raw score in raw JSON text, the score component is used: {"score":{"name":"@p"," objective":"test"}} So I'm using the ...
0
votes
1answer
21 views

is it possible to kill armorstands that are inside another armorstand?

i want to fil a 2D area with armorstands, so next to every other armorstand i spawn 4 and so on, but if i dont kill the armorstands that are inside of other armorstands the game wil lagg realy quickly....
1
vote
1answer
32 views

How can I make it so when a specific player hit an entity, it gets an effect?

I’m doing my server and each person has like a power or some kind and one player when they hit anything that thing gets levitation. I am not sure how to do it, but I'm fine if you tell me it’s too ...
-1
votes
1answer
69 views

How do I detect if an armour stand has something on its head?

I need to know how to detect if an armour stand has a helmet on its head. By that, I mean any item, such as a player head or other item. I already tested something like : execute as @e[type=...
2
votes
1answer
35 views

Why is /data modify not editing signs correctly?

I have the following commands: data modify block -107 78 -525 Text1 set from entity @e[limit=1,tag=test] CustomName data modify block -107 78 -525 Text2 set from entity @e[limit=1,tag=test] Health ...
0
votes
2answers
32 views

Using two variables to make a combined product (Minecraft Command Blocks)

My goal is to make a pig have its name and its lvl displayed on the same text but to do this I need to combine "name" and "its lvl" is there any way that I can take both variables ...
0
votes
2answers
36 views

Detect if armourstand have nothing on head?

Detect if armourstand have nothing on head? i am making map where peaople can place armourstand into armourstand and i want to repair it with peaople grab the head and then they can grab it from ...
2
votes
1answer
58 views

How can I make a T Fip Flop with commands in 1.13+?

I'm new to command blocks and I was watching this garage door tutorial which uses the following command to implement a T Flip Flop, i.e. it alternates between success and failure upon each activation: ...
-2
votes
1answer
28 views

How to add multiple lore statements

so, I have been trying to figure out how to add multiple lines of lore in place of enchantments, how do I phrase this... it displays Power enchantment.level.32767 where I only want it to be Power ...
1
vote
1answer
52 views

How to summon an invisible falling block in minecraft 1.16.5?

I'm trying to summon an invisible falling block using a repeating command block to get rid of the shadow created by it, I've tried using ActiveEffects NBT but that isn't seeming to work, here's the ...
0
votes
1answer
45 views

How do I play the raid horn sound in Minecraft Bedrock?

How do I make the raid horn sound play in Minecraft Bedrock?
-1
votes
1answer
31 views

How should I test for when 2 players have a total score of 20 when added together?

I need to kill players when together they have obtained 20 points in total. Say 1 player had 10 and the other had 10. When I add them together they add up to 20 and they need to be killed. How should ...
0
votes
1answer
29 views

Getting a command block with command inside [duplicate]

I have gotten commands into command blocks before with the /setblock. For whatever reason, this does not want to work even though this is the command. /setblock -477 6 1146 minecraft:command_block{...
4
votes
1answer
173 views

How can you have multiple colours in a single lore line?

I am trying to make a long description of an item, with multiple colours: give @p leather_chestplate{display:{Lore:'[{"text":"It is","color":"gray"},{"text&...
0
votes
1answer
63 views

How do I make a block trail for the player?

In Roblox, certain games implement trails, which basically is an effect where a player's trail basically follows them in their own material. Some are Rainbow, Basic Colors, etc. Also, in a given ...
-1
votes
1answer
49 views

How do I disable locator maps?

So I am playing on a world, and my friend is threatening to use locator maps to find and grief my base. How could I disable them using commands? (By the way, by disable I mean make them unusable.)
0
votes
2answers
49 views

How can you teleport behind a player?

I'm trying to make an item for an "assassin" class, where when you hold it, you teleport behind the nearest player. I have found another question, but it only applies to armor stands and ...
0
votes
2answers
88 views

How do I make a “landmine”?

I want to hurt my victims where if they head to a certain X and Z, they get blown up, and it should be quicker than TNT. How do I make a landmine with this concept?

1
2 3 4 5
85