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
0answers
10 views

How to make an if not statement?

I’m making a shop where you can buy something with emeralds. If you can afford it, it plays the mob.villager.yes sound. But if you can’t afford it, it plays the mob.villager.no sound. How do I script ...
0
votes
1answer
14 views

Minecraft Five Nights at Freddy's door/jumpscare system

I got a tip to break up my questions into parts so here it goes. Background Information I have created a "door" that is concrete powder and is pushed up and down by redstone, pistons, and a ...
0
votes
0answers
18 views

How to give myself a custom item in Minecraft Education Edition?

/give @p carrot_on_a_stick{display:{Name:'{"text":"Rod of Teleportation"}'},Unbreakable:0b,CustomModelData:123456,Rod of Teleportation:1b} 1 I know the syntax error is between ...
0
votes
0answers
9 views

How do I make kits in Minecraft for my minigame using command blocks? [closed]

I am trying to make a Plants vs. Zombies minigame and I'm having trouble making command block chains. I am just having a frustrating time because no Youtube video really goes over it that I have ...
0
votes
0answers
30 views

Five Nights a Freddy's in Minecraft. How to make a jumpscare, make a power system, and how to know if a door is closed [closed]

I am making a Five Nights at Freddy's minigame in Minecraft education edition, and I am stuck on three things. How to test if the door is closed if the door is closed nothing happens, but if it is ...
0
votes
1answer
19 views

How do I detect when a player triggers a raid?

I can't seem to figure out how to test if the player has started a raid with commands. I'm trying to make it so the bad omen status effect is not removed by milk as any other potion effect would be. ...
0
votes
2answers
41 views

I need help with a command block /execute command

I need help figuring out what this command is supposed to be written with the new execute command syntax in Minecraft 1.17.1. I presume the code is supposed to set a player's spawnpoint randomly to ...
0
votes
1answer
27 views

How to create a random spawnpoint off entities in Minecrat 1.17.1?

I have been trying to create random spawn points on my Minecraft server, for instance, if a player die, the player would respawn at designated spots on the server, where I have dropped some tagged ...
-2
votes
0answers
15 views

How to spawn mobs randomly using Minecraft commands?

I've downloaded a mod that lets me add the allay, copper golem and glare to Minecraft. They can be spawned using spawn eggs and commands. But they cannot spawn randomly naturally. I want these mobs to ...
0
votes
0answers
44 views

How to become a minecraft developer [closed]

I wanted to ask that how to be a minecraft developer and can we do that at the age of 10-12 years.
0
votes
0answers
35 views

How do I bind a command to an item?

I am trying to create a few modified weapons/items in Minecraft, so that when you hit something (left click) with the specific item, it executes a command. I have already found a few answers that make ...
1
vote
1answer
37 views

How to make blocks appear under your feet when you walk/jump?

Is there anyway to make blocks appear under your feet wherever you walk or jump? I there a way to make them disappear after like 20 seconds?
0
votes
0answers
19 views

How to make the saturation longer?

I am making a map and I wanted to make the saturation slower, because we all know that Minecraft Bedrock Edition's saturation is rigged and depletes so quickly. So, any ideas to make it slower? ...
0
votes
1answer
28 views

How do I delete exiting structures on a structure block?

I am a map creator, and it's kinda hard to find structures when you have a lot saved on your laptop. So, I have a question and might need your help: How do I remove structures on a structure block? ...
0
votes
1answer
28 views

(java minecraft 1.17) tag snowball based on owner

I want to make a projectile "belong" to a team by adding a tag to it. the players throw snowballs that are supposed to only hurt the enemies. Is there anyway I can use the owner nbt data to ...
-1
votes
0answers
18 views

Minecraft 1.12.2 /entitydata help

I’m trying to make an entity that’s already spawned in invulnerable using this command /entitydata @e[distance=10] {Invulnerable:1b} But I keep getting an error that says something like “parsing ...
-1
votes
0answers
35 views

How to make a key-locked wall?

I am making an adventure game in Minecraft and I am currently making an ocean monument level. I want to make it so that when you go and get a key and click a block, a few holes open in a 3x3 wall, but ...
1
vote
2answers
40 views

How to apply potion effects only in a certain radius, without applying it to yourself?

I'm trying to apply potion effects to mobs in a certain radius of me without applying it to myself as well, is this possible to do with the current state of commands in Minecraft 1.17?
0
votes
1answer
39 views

How to make all dogs stand up in Minecraft? [duplicate]

I know that the command /execute as @e[type=wolf] run data merge entity @s {Sitting:1b} will make all dogs loaded in sit down, but is there a command to make them all stand up at once?
0
votes
1answer
50 views

Is there a way to send a message to someone/everyone in the server from the console?

In version 1.17, is there a way to send a message to someone/everyone in the server from the console?
0
votes
1answer
18 views

How do you scan an area for a certain block? (JAVA 1.17.1)

So I'm currently working on a Minecraft minigame where the goal is for Team A to collect all the torches and Team B's goal is to kill Team A (basically Pac-Man(or dark deception)) and I'm asking: How ...
-1
votes
0answers
21 views

How do I make one of those start buttons that all minigames have? (MINECRAFT JAVA 1.17.1)

So I'm currently making a minigame myself and so far I haven't found anyone asking the same question I am right now: How do you make a start button that counts down and you can cancel the start ...
1
vote
2answers
27 views

Is it possible to recharge a respawn anchor automatically?

I am trying to make a time bomb for a mini game map, involving a pillar of quartz, and a respawn anchor on the top. Gradually, the respawn anchor recharges, and once it has been fully charged (because ...
1
vote
0answers
18 views

Detecting who activated a command block and adding a tag to a player? (Bedrock) [closed]

I am making a Bedrock Edition Cops and Robbers map, and I was wondering if there was a way to add a role/tag to a player. For example, if one player presses a button to be a prisoner, they get a ...
0
votes
0answers
9 views

How do you detect a certain block placed in area and the placing player

I want to be able to detect if someone placed a certain block near my servers spawn point and remove the block while warning them to not do it again.
0
votes
1answer
43 views

How do I teleport someone who enters a specific tunnel on Minecraft 1.17.1?

I am making a map on Minecraft 1.17.1 and I'm tying to make a challenge where you need to go through the correct tunnel, if you go through the wrong one you'll get teleported to the start. I don't ...
2
votes
0answers
31 views

How do I make a "PocketPal" in Minecraft as a pet?

it's StickyChannel92 for another question. How can I make a custom pet in a custom shape that follows me around? I want to be creative with not only with armor stands, but programming them to do ...
0
votes
2answers
47 views

How do I detect a certain mob?

I am creating a map and I want to make it so that when to defeat a zombie boss, a lever appears that sends you to the next level. Right now, I am trying: /execute unless entity @e[type=zombie,distance=...
0
votes
1answer
34 views

How to tp the players to a defined place?

I'm trying to make a Skywars minigame, and I need to teleport the players to an island. I don't know what to do, I really want to make this minigame, I'm in 1.16.5 Minecraft Java Edition. I've tried: ...
0
votes
0answers
35 views

How to save teleport location

I want to be able to teleport a player to a set location, and then back to the spot they were at, sort of like a /back command? I want to teleport everyone to an event area in the Nether, and then ...
4
votes
0answers
182 views

How to change a shulker boxes texture based on its name

So, I have been trying for a bit to find a way to change a brown shulker boxes texture when its name is "Emergency Cookie Rations", sounds silly I know, but every technique I have tried has ...
0
votes
1answer
23 views

How do I keep an item upon death?

I'm trying to give myself an item that will keep in my inventory when I die. This is my current command that I got from a YouTube video: give InstantNuggets compass 1 0 {"keep_on_death"{}} ...
0
votes
0answers
20 views

How to make a repeating command that will give a player an enchantment when holding a specific item?

I know next to nothing about command blocks, but I've managed to make a command block give a player an effect when an item is held. The issue is I can't get it to work with my test item. I used this ...
0
votes
0answers
32 views

How to summon Fireballs in random places with commands?

I need to summon Fireballs in random places, but I can't figure out how. Any help?
-1
votes
1answer
26 views

How to /tell a Player an NBT property of a item on 1.12.2?

I'm trying to create a small basketball game on my server (from scratch to learn command blocks). To test that it's working, I'm trying to have the Basketball item tell me who threw it. However, ...
1
vote
1answer
26 views

Command Block Effectiveness Range

Can you be too far away for a command block to work? (ie. command does not execute) I am curious because I was making a super-flat world a void one by filling a 7x7x4 zone around the player with air ...
0
votes
0answers
20 views

How do I do the equivalent of /testfor in Minecraft Java Edition 1.17.1? [duplicate]

I can't put /testfor because I'm in 1.17.1, and I try my best to use /execute. execute if entity @p in minecraft:overworld positioned ~ ~2 ~ run title @p title "Welcome to the Lab!" When I ...
0
votes
1answer
25 views

Function command doesn't work

I'm trying to make a datapack and a I have a function and when I call it normally within code or Minecraft it works fine and if I run the command execute as @e[tag=robot] if block ~ ~-1 ~ air run ...
0
votes
1answer
24 views

im trying to use a command where a repeating command block teleports someone to a spot but my command doesnt work

I was looking for a command and I found this: /execute @a[x=a,y=b,z=c,r=d] ~ ~ ~ tp @p e f g Where: a, b, and c are the XYZ coordinates that you want to teleport players from. d is the radius in ...
1
vote
0answers
20 views

How To set up a Tag game in Minecraft Bedrock

new poster here,sorry if this is a bad question. I want to set up a Tag game in Minecraft BEDROCK, but I've run into some walls. Assume the tag game is played like this: someone has a nametag named ...
1
vote
2answers
38 views

How can I pull/export data from a Minecraft scoreboard?

I need to export the scoreboard data of a Minecraft world onto a string, JSON or TXT file. I would be able to get the data from the savefile of the game but I haven't figured out where exactly is ...
1
vote
1answer
20 views

How do I make a command block work at any time a redstone signal is active?

I have a teleporter system I'm setting up where a teleporter will only trigger if you open a trapped chest and stand on a specific block. I'd like for it to work so that the block is somewhere away ...
2
votes
0answers
20 views

Modifying Minecraft Bedrock Enchanting Rules [migrated]

TL;DR is there a way to modify the enchantments that equipment can receive from an Enchanting Table? Working on a "lazy" addon that simplifies some things I do often. One big time waster is ...
0
votes
1answer
31 views

How do I summon a ghast fireball in Minecraft Bedrock Edition?

I can summon fireballs useing /summon fireball in the java version of Minecraft, but then I tried it in Bedrock Edition and it didn't work.
2
votes
3answers
49 views

How do you summon a zombie on a zombie horse?

What is the command to summon a zombie on a zombie horse?
0
votes
1answer
37 views

How do you make a wither unable to break blocks?

What is the command to make a wither called 1 unable to break blocks or summon a wither called 1 that cannot break blocks? Edit: So far I have made the wither stay in a certain location and face in a ...
0
votes
1answer
51 views

Simulate TNT and fireballs

For a bedwars Minigame in vanilla I need TNT and fireballs, but they should only break certain blocks and deal damage. For the TNT I have this: execute as @e[type=tnt,nbt={Fuse:1s}] at @a run function ...
1
vote
1answer
19 views

Teleport Command in minecraft ps4

I'm attempting to run a repeat command that will move an armour stand 1 block on the x axis, but when I put /tp @e[type=armor_stand] ~1 ~ ~ it does not move it 1 block from the entity, but instead ...
1
vote
1answer
21 views

Affect entities/players in a 4 block radius without you getting affected

I need a command that will effect players and entities in a 4 block radius with levitation, without yourself getting affected I'm on bedrock. (I apologize if I have bad english)
0
votes
0answers
32 views

How to add slowness and blindness when you hit something?

I am trying to make a Dead by daylight map in Minecraft. When a player hits something they should get slowness and blindness for 5 seconds, but I don't know the commands necessary to do this. Can ...

1
2 3 4 5
91