How to execute at a player holding a specific item in?

First off, put into the chat this command: Then, attach these commands to a repeating/chain command block string (in order) /scoreboard players set @a holding.gun 2 {SelectedItem: {id:snowball,tag: { put any other NBT tags in here }}}

How to use Skript to give effect to a player?

But it’s practically the same thing to do, here: if event-location is location at -72, 90 and 341 in world “world here”: #you can replace `world “world here”` with event-world if you want it to be in any world. He’s asking for a Skript solution, not a Java one.

Is it possible to detect what a player is typing?

Is is possible to detect what a player is typing. I am making a map and I want to make it so if they type: “/gamemode 1/0/3” or “/spawnpoint” or “/give” they will die and have to go back to the last checkpoint. Is this possible? Sorry for the delayed reply. I went inactive for couple years.

How to test if player is wearing specific items?

For example, I want to make it so when you wear a player head that looks like a spider head it would give you night vision. Is there some sort of command that tests if you’re wearing a certain item or a certain item with a specific name? Create an account or sign in to comment.

How can I detect if a player is wearing a specific piece of armour?

This for example does something only if a player with a Protection 4 diamond helmet exists somewhere in the world, but still in the same position that the command is executed at and as the same executor: The slot is 100 for boot, 101 for leg, 102 for chest, 103 for helm. The color is calculated as Red << 16 + Green << 8 + Blue.

Is there a way to make certain items only work?

Also for the selected item, is there a way to make certain named items only work. like for example a torch named like “Super Torch” would give night vision, but like a regular torch wouldn’t work? This way every item you hold and is named ZOMBIE gives you a Hunger I effect for 10 seconds.

How to check a player’s score in Minecraft?

Run a comparator from that command block to another command block running this command: /scoreboard players add @p ironIngots 1 (Increases the player’s ironIngots score by 1. Make sure you create ironIngots first!) Create another command block that does whatever you want.

How to check if a player has a testfor?

Align the command blocks along either the green or red line so that one of those lines points down the first to the last command block. You don’t have to press a button to use this, you just have to be the nearest player. You can change the command to the nearest player within 10 blocks, nearest player on a team, etc.

What happens when a player isn’t holding the glass?

Whenever a player isn’t holding the glass anymore, they still get the effect! To fix this, add a last command block that constantly sets the “holding” score of a player to 0. Make SURE this comes AFTER the first two, otherwise it could mess up the machine.

How to test if a player is holding a stick?

Just use a comparator to test if a player is holding a stick, and then invert it (via a redstone torch) and have the inverted signal leading to a command block. Now, whenever the player is holding a stick, the signal is inverted and the second command block deactivates. share|improve this answer.

How to test for an hold item name in Minecraft?

You can actually combine this into one command. Prior to 1.13, this would look like this: This will return an output if the player is holding a named diamond sword in the selected slot. However, the above command has been completely deprecated in 1.13. testfor is now Bedrock only, and the [r=] selector has been changed.

How to test if someone is holding something but not the item?

On a clock (or just before you want to use the testfor), in this order, run the following commands: The commands above set everyone’s NotHoldingItem score to 1, and then set it back to 0 for everyone holding the item, leaving only people not holding the item with a NotHoldingItem score of 1.

How to test if a player is holding a planet Minecraft?

Press F3 to get all of your client statistics. In the top left, look for the area that is labeled “Facing”. Make sure that you’re facing north (or negative Z, whichever you prefer). Commands will then activate from bottom to top, and left to right.

What to do if you cant play Minecraft?

If playback doesn’t begin shortly, try restarting your device. Videos you watch may be added to the TV’s watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer. Hello everybody, welcome to my channel!

You Might Also Like