Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [minecraft-commands]

Anything related to the usage of server commands or command blocks in the game Minecraft. If you're building a redstone device without commands, use the minecraft-redstone tag instead.

1
vote
1answer
26 views

How to use TrustedUUID?

For a while, I have been experimenting with NBT Data on Minecraft. Recently, I wanted to make a fox that trusts both me and a friend of mine, and I know this is possible, as they have the tag ...
0
votes
1answer
24 views

Set gamemode of a player within a radius to Survival with Command Blocks

I've been trying it for two weeks and it still doesn't work. How do I set the gamemode of a player within a certain radius Survival with Command Blocks?
-4
votes
0answers
34 views

How to make a vanilla Tsunami with command blocks in Minecraft [on hold]

I have been wanting to test out my builds with a vanilla tsunami because with mods you have to download a bunch of stuff and I just don't want that so does anyone know how to make a tsunami in vanilla ...
1
vote
1answer
44 views

JSON Text to normal text

For some time now I've been trying to make it so that I can have a slab kind of like an altar. And any player/mob head that gets thrown onto that slab will have the SkullOwner be the custom name of ...
-2
votes
0answers
19 views

How do i testfor multiples items in a hopper? (1.14.1)

I'm trying to create a Minecraft sieve and my plan was to run a command that detects how many items are in the hopper, and use a loot table to spawn items equal to how much was in the hopper. Ex: I ...
-1
votes
0answers
13 views

Is there a way to detect the player name a “/testfor” command has detected?

Simply put I want to make a minigame on my server. where when a player reaches 15 kills the game is over and the player who got the 15 kills wins. I can detect and send a pulse when "A" player reaches ...
4
votes
1answer
33 views

Copying NBT data - Set SkullOwner to entity name

For some time now I've been trying to make it so that I can have a slab kind of like an altar. And any player/mob head that gets thrown onto that slab will have the SkullOwner be the custom name of ...
-1
votes
1answer
40 views

How to rotate an item frame with a command?

I want to reset the rotation of an item inside an item frame (in an exact position/coordinates) using a command. I was thinking about using replaceitem, but it says in that page: The inventory of ...
-1
votes
2answers
22 views

Is there a way to Select the Entity that Activates the Command Block / Sign?

This is a very important Question to me, as it relates to my Server/Realm as I use completely command blocks for everything, and due to the point that the closest thing to detecting the activator is ...
-1
votes
1answer
40 views

Can I Make A Wireless button that tp's someone in Minecraft 1.13-1.14?

Is it possible for me to create a button that tp's someone without and redstone or commandblock on it or near the button like a wireless button
1
vote
1answer
40 views

Minecraft - How to detect where a player is

my question is simple. How do I use command blocks to detect any player at a set of coordinates then do x? Here’s what I have that doesn’t seem to work:
0
votes
1answer
57 views

How to use command blocks in minecraft 1.14 to trade items in my inventory for other items? [closed]

I am currently trying to use command blocks in Minecraft 1.14 to trade items in my inventory for new items. The trade should only work if the player has the items to trade for and should not change ...
2
votes
1answer
67 views

How to make a command block summon an end crystal on top of said command block in minecraft 1.14.1

I want to put a command into a command block that will spawn an invulnerable end crystal directly on top of the command block relative to the command block's location in world. This is the current ...
0
votes
1answer
24 views

Minecraft Command Blocks, using /data string values within other commands

In Minecraft I'm able to determine the id of the first item in a chest with the following command: /data get block <chest coordinates> Items[0].id which returns the id as string value. For ...
0
votes
0answers
17 views

How do i make a command so people can place commands

I want to make a command (but i don't know how) that when someone holds a command block renamed Lucky Block it puts them in creative and gets rid of one that they are holding (so if they are holding ...
3
votes
2answers
88 views

using /setblock to place a colored bed in Minecraft 1.12

So I tried placing a white bed using the setblock command, like I did below /setblock ~ ~ ~ bed 0 I used "0" because that's the data value for a white bed. But this did not work and it only placed ...
-1
votes
1answer
24 views

How to test for specific players at specific locations with command blocks

So, I’ve looked all over for solutions to this issue and they all say to use /testfor @a[x=X, y=Y, z=Z, r=R, name=playername] But this doesn’t do anything for me. I’m using a repeating command block ...
-1
votes
0answers
28 views

How to execute an effect through a specific item in minecraft [duplicate]

Okay so this post was marked as a duplicate and it's not, I am on bedrock edition so 100% of the linked posts are not going to help because they are completely different or take me to a command line ...
1
vote
0answers
52 views

i need a 1.14 kill command for a minecraft map! [closed]

So I have tried 30 or so command outputs to see if they could kill you if you step on red concrete, and i think its stupid to have pressure plates on every block. I have also looked at 1.13 feeds, and ...
0
votes
0answers
39 views

Force Player to Stop Talking to Villager (1.14)

I need a way to when a player clicks on a villager to trade, instead it runs a command. The scoreboard part was easy, (there's a criteria for talking to villagers under "minecraft.custom"), but of ...
-1
votes
1answer
25 views

Would you be able to add an NBT tag to an already 'spawned' mob?

After a mob is spawned, or summoned, would it be possible to give it more NBT tags? For example, could I have something such as /nbt @e NoAI:1 (I know that's not a real command) to freeze every mob in ...
1
vote
1answer
24 views

How to compare two entities by one of their attributes?

So basically I'm doing a minecraft datapack for my server, but being really new to that I'm stuck on a problem and I don't know how to solve it: I've got this line detecting if there is an item frame ...
3
votes
1answer
40 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 ...
3
votes
1answer
28 views

How to prevent the switching of items inside the hotbar in vanilla minecraft [1.12.2]? [duplicate]

Is there a set of commands I could use which would allow for me to prevent a player from switching items? So if their "selectedItem" slot is 1, they can't switch the slot to 2.
2
votes
0answers
26 views

Minecraft 1.14: How to check if a player has a position with a specific y-axis within a circular x,z area [duplicate]

Pretty much it's a climbing game. The first person to reach a certain height within the game boundaries wins. It's multiplayer so there could be people outside of the game at the specific y-axis as ...
5
votes
0answers
46 views

Testing for items being held by cursor

Using functions and 1.14, I tried testing for a book and quill with nothing typed inside, tag @a[tag=cleanbook] remove cleanbook ^ resetting the tag since it's an infinite looping function. tag @a[...
0
votes
0answers
25 views

How can I run a command in server control panel and have the result said in game chat?

I'm trying to get my server to type "tps" into the console every 5 minutes and then forward the result to the ingame chat for players to see. Right now if I type tps into the control panel it just ...
2
votes
1answer
23 views

How do i make a falling_block that i can select blocks through?

I am trying to make a grass field, only that it isn't actual blocks for the grass or tall grass, but rather falling_blocks. However, when I attempted to use Markers:1b for this purpose, it ignored ...
-5
votes
1answer
33 views

minecraft testfor @r[r=13] “/gamemode ”that player“ adventure” [closed]

I have a command block that looks for a player in its radius, but wonder if I then can do this: /testfor @r[r=13] /gamemode adventure "the random player"
-2
votes
0answers
26 views

How do I clear named items from a player?

Im trying to make a voucher that, when redeemed, gives you money. The problem is that the voucher is named "lily pad". I made it so unnames lily pads aren't allowed (they are cleared) but it also ...
1
vote
1answer
83 views

How to check if a spawner is broken in Minecraft 1.14?

So the new 1.14 update seems to have changed a lot of commands (again). All I'm trying to do is detect when the player breaks a spawner in a specific location. Say for example the spawner is at -200 ...
-1
votes
1answer
82 views

(Minecraft Java 1.14) CanPlaceOn tag not working

I'm making an adventure map, and I want players to get a button that can be placed on a gold block. The command worked in version 1.13, but now it just doesn’t. The command I used was: /give @p ...
1
vote
0answers
19 views

Can I remove a spawnpoint? [duplicate]

When I set a spawnpoint using commands for me or another player, I keep spawning at that exact point, with an exception: when I change it. What I want, though, is to remove it completely and spawn at ...
-3
votes
1answer
50 views

(Java Minecraft 1.14) Trouble giving a scoreboard tag to a /given item

I have the command /give @p minecraft:nether_star{Tags:["catalyst"],Enchantments:[{id:"minecraft:channeling",lvl:1}],display:{Name:"{\"text\":\"Catalyst\",\"color\":\"yellow\"}"}} 1, which works ...
-2
votes
1answer
33 views

Minecraft map spawnpoint for any player that joins [duplicate]

I am creating a minecraft 1.14 puzzle map. I would like to know how to set a spawnpoint for any player that downloads the map. Can anyone help me with this?
-3
votes
0answers
14 views

How to test if player is wearing specific armor 1.13 [duplicate]

I want to test if a player is wearing a leather chestplate named "Hazmat" and if not, kill them. Maybe if player is wearing armor tag them with "HazSuitOn" or something. Idk just some ideas. Any ...
1
vote
1answer
35 views

half the xp on respawn in minecraft 1.14

I run a server with my friend and the majority of the members want keepinv enabled which he's fine with, but he'd like the xp to be half'd in order to create an incentive to not just reset whenever, I'...
1
vote
1answer
49 views

Announce when player enters the nether in 1.14?

I'm not very knowledgeable in mc commands but I had been trying to write a system that would announce if a player had entered the nether using execute and scoreboard, unfortunately the outcome was ...
1
vote
1answer
53 views

Is it possible to display output of /data from a command block?

I'm playing 1.14 and wanted to test some villager mechanics in a creative world. To help debugging I thought it'd be a good idea to constantly print the home/workplace information of the closest ...
-2
votes
1answer
79 views

(Java Minecraft 1.14) How to use /data with an nbt path?

This site and this site both speak of an nbt path which allows me to put a certain value (say, the durability of the currently held tool in a player's hand) into a scoreboard. The wiki describes a ...
-2
votes
0answers
24 views

What can i do for a item to be placed or held on/above a block (MC XBOX 1)

Im looking for a command or something i could do to make an item be showing on or above a block What im doing is making a cafe and i would like to have it so something like an armour stand is holding ...
0
votes
1answer
36 views

(Java Minecraft 1.14) How to detect when a spash potion explodes, and it's position when it explodes?

I'd like to summon a fuse 0 creeper at the position of a splash potion when the splash potion hits something. What I need to know is how to detect when it hits something. I have three ideas currently: ...
0
votes
1answer
69 views

(Java Minecraft 1.14) Unable to give player custom potion with Harming 4?

I'm trying to make a Holy Hand Grenade type of splash potion which has instant harming 4. I have give @s minecraft:splash_potion{CustomPotionEffects:{id:7,Amplifier:3,ShowParticles:0},Enchantments:[{...
1
vote
1answer
58 views

Break blocks in adventure mode

I've been using the /give @p minecraft: diamond_shovel 1 0 {CanDestroy: ["minecraft: sand", "minecraft: grass"]} command to destroy blocks in adventure mode, but now I need the pickaxe to break all ...
0
votes
1answer
104 views

How do I summon specific villagers in 1.14?

I've tried using codes from 1.13 for it but it doesn't seem to work I always get the same villager, if there is a command for this in 1.14 can someone please tell me it?
0
votes
1answer
27 views

In Minecraft version 1.13.2, is it possible to command a block that asks the player what command they would like to trigger in the chat?

I'm making a teleport elevator command, where you can go in and select one of many levels. To save space and not have a button or sign for each level, I thought it could show the options in chat like, ...
-1
votes
0answers
48 views

(Java Minecraft 1.14) Scoreboard objective for ghast fireballs deflected?

Do I need to set up a system to track the fireballs a player deflects or does the statistics system already have a pre-made scoreboard objective for it? I couldn't find any page of all of the stats on ...
-1
votes
0answers
22 views

How can I give an already summoned mob velocity, or make it walk in a direction?

I am trying to get a villager that is static to start moving whenever I want. For example, there is a villager standing, and at the press of a button I would like a command block to make that villager ...
-2
votes
1answer
56 views

How do I give a player a message when their hunger is low?

I want players to get the message "Your hunger is low: eat something." when their hunger is at three bars.
1
vote
1answer
36 views

How to team player with the first player they see?

I am making a 1.14 minecraft minigame, and one aspect is when two players not on a team walk up to each other, they are put on the same team. I am wondering how to do this.I have included all 16 team ...