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
1answer
8 views

How do you move a armour stand do blocks front from its position in minecraft

How do i make a armour stand tp 2 blocks in front from its natural position
0
votes
1answer
19 views

Minecraft - How do I use Pressure Plates to teleport on my Minecraft Server?

I recently started my own server for friends running the modpack "The Pixelmon Modpack" on Curseforge. In order to add more flavor to the pack, I also decided to download a custom map called ...
0
votes
1answer
15 views

Clear a specific item in Minecraft PE Bedrock

I've read all the same questions already but mine is in Bedrock, not Java, so. I need a command to clear one item custom named from my inventory. I've already tried clear @p [type=light_block] 1 and ...
2
votes
0answers
31 views

Commands still run from killed armor stand

I have the following commands run by an armor stand in a function say Hello. I'm here! kill @s execute as @s run say Still here When I run it on an armor stand I get [Armor Stand] Hello. I'm here! [...
0
votes
1answer
18 views

Minecraft command block execute when button goes up?

I want to connect a button to a command block, and execute a toggle command when the button goes "off" In Javascript terms, I want to execute a command "onMouseUp" Command blocks ...
1
vote
2answers
30 views

How to create a countdown timer that triggers an event on ending?

I found one article to set up a simple timer and that works fine. But Im trying to get something to execute when it gets to 0. Here is what I have so far: I run this one time to create the timer ...
0
votes
1answer
27 views

How do I use tildes and carets in the teleport command?

I need help with using these symbols because the wiki isn't helping me. Also, when I use this ^ in a repeating command block, it doesn't update where I am looking at.[1] Could someone help me? [1]...
0
votes
1answer
26 views

How do you tp to the nearest Arctic Fox?

I know how to tp to the nearest fox regardless of what type it is. It would be performed via the following command: /tp @s @e[type=fox,sort=nearest,limit=1] However, I was wondering how would you ...
2
votes
1answer
24 views

Can you summon a blind mob in minecraft 1.16

I would like to attempt to fight a zombie that has 84 health and can do 31 damage, just like the warden that will be added in Minecraft 1.17. I know how you can make custom health and damage values, ...
2
votes
2answers
53 views

How can I start an illager raid via commands?

How can I start an illager raid via commands? I've looked into mob events but they don't seem to trigger anything. I'd prefer a solution where it not be required that the player is in a village for it ...
-1
votes
0answers
22 views

/give command failing with “Syntax error: Unexpected “{“ ” [duplicate]

The command is /give @s stick{Enchantments:[{id:knockback,lvl:10}]} It comes up with: Syntax error: Unexpected “{“ at “e @s stick>>{<<Enchantmen I am using version 1.16.2 and I have ...
2
votes
3answers
35 views

Can you copy blocks on Minecraft Bedrock? [duplicate]

I'm making a bed wars map and the command blocks are VERY boring, is there a way to copy a command block so that when you place it down again it has the same command. I'm on Xbox by the way
1
vote
1answer
42 views

How can I enforce first person view in Minecraft 1.12.2?

I am trying to make a map where you cant go in 3rd person, however when I check Google and Arqade it either don't find a answer, or it no longer works. This is all in Minecraft Java Edition 1.12.2
0
votes
0answers
17 views

Command block comparator not outputting redstone signal outside 32 blocks. Minecraft Java 1.16.2

I have a command block hooked up to a comparator that powers some other command blocks. When I have a specific item held in my offhand it emits a redstone output. However, when I go further than 32 ...
0
votes
2answers
48 views

How to make a objective list with scoreboard Minecraft Bedrock

I'm making a map in Minecraft Education Edition, I wanted to make like a scoreboard objective that stays in the side of the screen (I saw this in Hypixel first). But I can't make a list of objectives, ...
-2
votes
0answers
33 views

Is there a limit to the amount of characters in a click event on a sign

I am able to run commands using the click event on a sign that exceed the 256 character limit, but I can't run a different command that is 5735 characters long This is the command: /setblock 0 0 0 ...
1
vote
1answer
35 views

How do i place a wall in minecraft with properties

I was thinking that: /setblock ~ ~ ~ minecraft:andesite_wall[east=low,west=low,north=low,south=low,up=false,waterlogged=false] but it does not work
-1
votes
1answer
60 views

How can I emit a redstone signal when a player eats a golden apple?

I need it so that when a player eats an golden apple, the command block sends a redstone signal. Is there a command for that?
-1
votes
1answer
35 views

how to mark more hp in a command

How can I use the command execute as @a[scores={health=<number>}] at @s run tp <coordinates> with multiple lives? For example, in the command execute as @a[scores={health=1}] at @s run tp ...
0
votes
1answer
33 views

How to execute if there's a certain block within a radius

I'm trying to figure out how to execute (for example /say hi) when there's Yellow Terracotta in a certain radius or field, however I can't figure out how to do it. Anyone knows?
0
votes
1answer
33 views

Minecraft Java server won't let me increase RAM usage, and also crashes easily,,

So, I'm using Mojang's guide as well as a YouTube video to help me set up this server; I've been told that in the start.txt file, you can set up how much memory is used during/after startup by pasting ...
-1
votes
1answer
36 views

Is there a command in Minecraft Bedrock Edition that can repair your armor and weapons to their full health? [duplicate]

I am interested in growing my knowledge of commands and would find something like this very useful.
14
votes
2answers
5k views

How can I prevent players from having a specific item in their inventory?

My brother has a problem with hooking people with fishing rods instead of focusing on survival. I know about the /clear command, but command blocks are only active when the chunk they're in is loaded, ...
1
vote
2answers
32 views

Is it possible to see history of command blocks oín minecraft?

So one of people i know said that somehow it is possible to see command block history (by that i mean commands that were there and then deleted/replaced) So i just wonder if it's possible. I cant find ...
0
votes
1answer
51 views

What is the id for SCP 106 head

I am trying to make SCP SL in mc but I need SCP 106's head, I checked name mc's database but I could not find it. this is all in Minecraft Java 1.12.2. NOTE: SCP-106 looks like a decaying old man.
-1
votes
0answers
28 views

can you make random items drop from random blocks?

how do I make a random Item drop from a random block. Is it /execute {blocks:"minecraft:stone"} summon Item [name=coal] or is it super long or can I not do It (on xbox)
1
vote
1answer
30 views

Why does execute “as” not work in Command Block

Basically, I am trying to make a system so that when a player dies a dead body (armour stand with team colour) spawns 1 Block underneath the death spot so that when it is lying on the ground the legs ...
0
votes
1answer
54 views

How do you modify the attack speed NBT in Minecraft 1.16?

I was trying to modify a tool's attack speed NBT, and stumbled across this thread. I tried to use the command, but it only seems to reduce the actual attack damage of the tool, and not the attack ...
-1
votes
1answer
39 views

How do I kill the player in Minecraft when they enter a specific area (-131 5 236 to -122 5 227)?

Am making a minigame where the player dies when they fall and I need to kill them without destroying items. I don't want to use tripwire hooks.
2
votes
1answer
30 views

Create spawners that spawn entities with an initial velocity?

I want to make a spawner (block entity) that spawns entities "launching", i.e., with an initial velocity and rotation. The following command, however, places a spawner that spawns arrows ...
2
votes
0answers
29 views

Is it possible to give items with a custom max durability? [duplicate]

I want to make custom weapons, tools and armour with a datapack. I want to start with basic extra items like steel armour, ..., and I want to give it slightly higher durability than iron. Is this ...
0
votes
1answer
43 views

Why doesn't this /give command work?

So basically I have this command, give @p sign 1 0 { BlockEntityTag:{ Text2:"{\"text\":\"Don't Click me\",\"strikethrough\":true}", Text3:&...
0
votes
1answer
50 views

How to clear huge area in Minecraft

What I'm trying to do here is clear a massive area in my world. I can use the fill command with air but that is limited to so many blocks. So what I was wondering is if there is a line of code I could ...
0
votes
1answer
39 views

what does “line 1 column 2, missing ”}" or object member mean? [duplicate]

I tried /give @p diamond_sword 1 0 {ench:["minecraft:knockback"{id:lvl,1000} and it gave me that upsetting error. does this command not work on xbox? am I doing it wrong?
0
votes
1answer
22 views

Is the alpha channel supported in Minecraft tellraw?

So I'm trying to add transparency to Minecraft tellraw so text can be partly transparent, and I'm stuck. I've tried to add it via hex code, in the format #AARRGGBB and the alpha value is completely ...
0
votes
0answers
14 views

How can I detect if an entity's Y coordinate decreases? [duplicate]

I started creating a green day (from Jojo) using the datapack and I need to detect when an entity's coordinates Y are reduced. Is there a way of detecting when entities move downward?
0
votes
1answer
37 views

How to enable day light cycle?

In my Minecraft server made from aternos.org there is no daylight cycle, There will always be day. Is there a method to turn on day light cycle in the server without cheats?
0
votes
0answers
17 views

Command Block Funkiness

I am trying to do something with command blocks in Bedrock 1.14, and I am probably being a complete noob but my chain command blocks aren't working. And, before you yell at me, yes, I did make sure ...
-1
votes
0answers
44 views

How do I fix this error with a trade villager? [duplicate]

I'm trying to make a custom villager with specific items to buy and sell. This is the item that I want the villager to sell: /give @p minecraft:player_head { display:{ Name:"{\"...
0
votes
1answer
23 views

need help with /execute to test for a team at a specific y level [duplicate]

Im trying to make a minigame on a server, and im having trouble detecting if a player is at a specific y level, here is what i have. /execute if entity @a[team=Bluesumo] positioned ~ 4 ~ Bluesumo is ...
-1
votes
0answers
42 views

How to detect if an entity is moving downwards?

I started creating a green day (from Jojo) using the datapack and I need to detect a change in an entity's Y coordinate - specifically to detect when they are moving downwards. Is there a way of ...
0
votes
1answer
43 views

How do I replace blocks around me as I move?

Basically I need a command that as I move it replaces all of one type of block. when I search up commands like this it always fails because I am in 1.16.4 and the commands are outdated. basically like ...
1
vote
3answers
39 views

Minecraft replace command syntax error

I am using minecraft bedrock on my switch. All I want to do is to remove all the oak trees so am using the fill/replace command but all I get back is “syntax error: unexpected “minecraft:log”: at “05 ...
1
vote
1answer
32 views

Problem with RequiredPlayerRange on spawners

This is on the latest Minecraft version, 1.16.4 I have been trying to figure out how to get it to work with NBTEexplorer. I changed the RequiredPlayerRange to higher then default amount which was 16 ...
1
vote
0answers
36 views

How can I use commands to give an item to the person who killed a player?

For example, if player A killed player B, how can I make it so player A gets a specific item using commands? ~~~{if you killed A player you will get diamond,if you kill B player you will get emerald ...
0
votes
1answer
56 views

Summoning a villager with specific (Non-Custom) trades [duplicate]

Today I had an incident on my 1.16.4 Minecraft server where a Player had his house unnecessarily grief'd by a cheater using fly hacks. Typically in the circumstance I would give the player some of his ...
1
vote
0answers
47 views

Test if an nbt string contains another nbt string

Story So I’m trying to make a searching system in Minecraft 1.16, and need to be able to get search results. To get search results, I can test if the search query is contained in any of the ...
1
vote
1answer
89 views

How can I allow Riptide to be combined with Channeling and Loyalty?

Title contains the core of it. The way I imagine it to work is: When not in water/rain, instead of blocking you from throwing the trident, Riptide has no effect. Riptide, when actually used, negates ...
0
votes
1answer
39 views

How to teleport player 5 blocks in front of them with command blocks

I've been trying to create a command block where the player places down a spawn egg and they will be teleported in front of them. I have already figured out the spawn egg part but I can't figure out ...
1
vote
1answer
56 views

How to check for something every tick, but only run a command one time when the condition is met?

I'm making a Minecraft 1.16 datapack and I need to check if a player is in a certain location. I want to check for that condition every tick and then run a function when it is met. I'm currently using ...

1
2 3 4 5
82