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.

520 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

How do I run a summon command based on the amount of HP the main mob has?

I have tried many lines of code, and none of them seem to work. This is the code I use to store the health score: execute as @e[type=zombie,limit=1] at @s store result score @s Health run data get ...
0
votes
0answers
47 views

How necessary is the “Name” tag for player heads after the skin data is already retrieved?

I'm trying to see if I can omit the "Name" tag from a player head after already getting it's "Properties" tag filled out with the skin data and still have the player head skin work ...
0
votes
1answer
27 views

Minecraft yellow text is showing up with a symbol I can't remove

The symbol I'm having problems with is the one highlighted above in the red circle. My code is the following: §eRIP Jeremiah! §eOverlord of green pricks! §eI'm a grape! §eHiro is top dog! §ePromoted ...
0
votes
0answers
22 views

why doesnt my bed override my spawn point after i changed the world spawn location?

So, in my server I wanted the players to spawn far away from my base, around 1k blocks away, then i used /setworldspawn and since then the bed doesn't override the spawn point, I keep spawning in a ...
0
votes
1answer
16 views

How do I do /execute and filter it by name?

I want to have a command block that has /execute if entity that will only execute on entities with a custom name, but I can’t figure out how to do it.
0
votes
1answer
44 views

How to host multiple minecraft servers on the same IP>=?

i just started a minecraft server for me and one of my friend groups to use, but i'd also like a separate server for my other friends. I downloaded the server file again, made a new folder, did all ...
0
votes
0answers
18 views

Using commands in a different Minecraft multiverse-core world. (Minecraft Java Edition)

I was wondering if there was a way to use a command in one world that happen in another world. (With multiverse-core) In particular I would like to do a custom plugin command. This will be in a server,...
0
votes
1answer
19 views

Is it possible to give other players the ability to use my powertools?

Can I give other players the use of my powertools with the EssentialsX plugin for Bukkit? Not the ability to use the /powertool command, but the usage of my premade powertools. Example: I make a ...
0
votes
1answer
33 views

How to track when all team players die (mc 1.16)

I am trying to make my own dodgebolt minigame (from mcc) and I'm struggling with the teams aspect. I know I need to create a scoreboard to track deaths so that when all the players on the team die, it ...
0
votes
0answers
37 views

Making a spawn egg that spawns minecart spawners that will spawn non pig mobs without op

Is there a command that gives you a spawn egg that will spawn a spawner minecart that can spawn a cow? It seems to only work with op on servers, but is there a different command that will work? I ...
0
votes
0answers
13 views

How to change the SuccesCount of a command block in 1.13+ with the /data command?

I am trying to get a command block to stop sending a redstone signal into a comparator. When you remove the powered comparator and replace it, it will still get powered because the command block's ...
0
votes
1answer
28 views

How do I tp/give people at certain coordiantes?

I'm trying to build a kit PVP, and to get money for kits you have to sell ores. I don't want to make a generator like in Bedwars because you don't have to stand there, and for coordinates I don't want ...
0
votes
0answers
39 views

How do I write a command block to detect if no online player has a specific score and execute a command?

execute unless score @p playerid = step10 time run say no players As the @p finds the nearest person, it doesn't check all players at once and therefore fails to not run when someone online has the ...
0
votes
0answers
19 views

Trigger Pre-1.9 Dragon perch with commands

Is there any way to use commands in Minecraft 1.7.2 to trigger a charge from the Ender Dragon? (The dragon before 1.9 charges at you, rather than perching)
0
votes
1answer
25 views

In Minecraft 1.16 I can’t figure out how to check if an entity isn’t in the air

This is the command I used which isn’t working: execute as @e[type=husk,tag=remake] run execute at @s unless block ~ ~-1 ~ air run tag @s add looted This command is adding a tag called looted to the ...
0
votes
0answers
59 views

Minecraft villagers custom trades and custom items (1.16.5)

i am making rpg map and i have one big issue, i need custom villager trades with my custom items here (using just command blocks) and if i created custom trade with this command : /summon villager 73 ...
0
votes
0answers
28 views

Minecraft Java Commands read from Json file

So I have a json file and I would like to read it with Minecraft commands, such as displaying the message inside of the json file. How could I do this with Minecraft 1.16?
0
votes
0answers
30 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
0answers
25 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
1answer
33 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. ...
0
votes
0answers
33 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
1answer
92 views

How can I summon a minecart and have the player automatically enter it when spawned in Minecraft Bedrock Edition?

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 (...
0
votes
0answers
32 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 ...
0
votes
1answer
39 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....
0
votes
0answers
29 views

How to tag all snowballs that aren't riding another entity?

I want to detect all snowballs that aren't riding a falling sand entity and give them a custom tag called "AbleToStack" set to 1. I also want to detect all falling sand entities that aren't ...
0
votes
0answers
32 views

Is there a way to make a sword strike lightning whenever you hit someone?

This question has been asked before but all questions are old and none of them are for bedrock edition. is there a way using command blocks to make it so that whenever you hit someone with a weapon ...
0
votes
1answer
54 views

In minecraft, How do i set a spawnpoint using command blocks

I'm trying to make a parkour course and I want to have the player respawn at every new checkpoint they reach when they die
0
votes
1answer
61 views

What am I doing Incorectly?

I am trying to kill all entities in a custom dimension named "console" except myself, armor stands, and items. At the moment, it is killing all entities in all dimensions except me, armor ...
0
votes
0answers
46 views

Find fishing bobber “owner” in Minecraft 1.16

I'm attempting to allow someone to use a fishing rod and essentially make an ore buster. I'm just not sure how I would be able to efficiently find the user of said fishing rod and perform the rest of ...
0
votes
0answers
28 views

How to use the /testfor command to Locate dyes in Inventory?

How to use the /testfor command to Locate dye in Inventory? I am in Minecraft Java 1.12.2. Using The scoreboard tags. I think this works but not sure. /testfor @a {Inventory:[{id:"minecraft:dye&...
0
votes
1answer
45 views

Summoning projectile with motion

I have been trying this for two days and cant get anything. I just want a trident to move. I used motion tags, direction tags, power tags, and it just spawns and falls down, this is what I have so far ...
0
votes
1answer
44 views

How do I get some other entity to rotate as me?

execute at @p run tp @e[tag=entity] ~ ~ ~ ~ 0 rotates an entity but it teleports it to me. Is there any way to just rotate an entity to look in the same direction without teleporting them?
0
votes
1answer
37 views

Can I move armor stand legs up?

I'm trying to make an armor stand look like its flying with elytra, and I can't seem to get it right. The command I'm using is: /summon armor_stand ~ ~ ~ {NoBasePlate:1b,ShowArms:1b,Rotation:[53f],...
0
votes
1answer
41 views

Can I add an enchanted apple cooldown?

Is there a way to add a cooldown for eating enchanted apples? I don't want the player to be able to eat a lot at once in my PVP game.
0
votes
0answers
30 views

How do i execute a command relative to player's torso rotation?

I know that that exists: /execute at @p rotated as @p run particle minecraft:barrier ^ ^ ^3 but it uses head's rotation
0
votes
0answers
34 views

How to spawn falling sand with Motion using a spawner minecart

I was trying to make a spawner minecart fountain for like 3 hours and couldn't find anything that helped me on Google. With the /summon command, the Minecart could spawn entities with passengers, ...
0
votes
0answers
25 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
1answer
71 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
361 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 ...
0
votes
1answer
37 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
23 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 ...
0
votes
0answers
62 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 ...
0
votes
0answers
15 views

How to keep only a certain amount of 1 mob in an area

Every time I walk into a pressure plate, 3 zombies spawn, and I only want there to be a maximum of 3 zombies in the area at any time. How can I make it so that if I used the pressure plate again, the ...
0
votes
0answers
21 views

How do I make balanced and randomized teams?

I am making a mini-game, and I need to make two teams (Red and Blue). The teams need the be balanced and randomized.
0
votes
0answers
70 views

Scoreboard won't show in Minecraft for health criteria

I'm currently very frustrated with the scoreboard command. I'm trying to create a scoreboard that displays HP under the player's username and in the tab menu. I've tried the following different ...
0
votes
0answers
52 views

How to detect block face using raycasts

I am currently trying to figure out a way to accurately detect which face of a block is hit from a player's raycast. For example, If a player was to fire a raycast and it hit the north facing side of ...
0
votes
0answers
27 views

Moving big chunks of blocks mutltiple time in minecraft

I want to be able to move 4 rows of blocks with a space of one block between each chunk horizontally. (the patern look like this |||| |||| |||| ||||) and I have about 30 chunks of five row, each row ...
0
votes
2answers
134 views

Teleport command issues?

So im trying to make a teleportation area that will teleport players to certain points in my world. I have multiple command blocks next to each other because there are multiple selections as to where ...
0
votes
1answer
96 views

Execute summon item command issues

I need some help with the execute summon item command and here is a example I made from the same type I am using for my server but cannot seem to get it to work.. any chance anyone knows what I did ...
0
votes
1answer
79 views

Minecraft Infinite City Street

I am creating a city in Minecraft. I want to create an infinite street. How do I do this? I only want it infinite in one direction, so one end should have an end.

1
3 4
5
6 7
11