Minecraft: How to give an effect to a certain player standing on a block on multiplayer?

Minecraft: How to give an effect to a certain player standing on a block on multiplayer? - Person Holding Black and Green Tennis Racket

Hey I am making a multiplayer map and it includes magical blocks that will give you certain effects for example:

/execute @p[r=10000] ~ ~ ~ detect ~ ~-1 ~ wool 15 /effect @p invisibility 12 3 true

which gives invisibility when the "nearest" player stands on it. How can I give the effect to the player who stands on it, not just the nearest player to the commandblock giving the command?



Best Answer

VERSION 1.16+

execute at @a[distance=10000] if block ~ ~-1 ~ [block] run effect give @p [effect] [seconds] [amplifier] true



Pictures about "Minecraft: How to give an effect to a certain player standing on a block on multiplayer?"

Minecraft: How to give an effect to a certain player standing on a block on multiplayer? - A Man Holding a Golf Club
Minecraft: How to give an effect to a certain player standing on a block on multiplayer? - Young Man Standing by Volleyball Net with Ball in Hands
Minecraft: How to give an effect to a certain player standing on a block on multiplayer? - A Man Standing on the Grass



How do I trigger command blocks when a player walks in a certain area?

This /effect command uses an ID value of 8, a duration of 50 seconds, and an amplifier of 1. This will give the player called DigMinecraft the effect of Jump Boost II for 50 seconds. The amplifier is used to increase the level of the effect....Add Effect using Effect ID.Effect IDAmplifierResult83Jump Boost IV3 more rows

How do you give someone an effect in Minecraft?

If want to give multiple blocks at once, you need to specify an Amount in the /give command. The amount goes after the Item that you are giving. Type the command in the chat window and press the Enter key to run the command.

How do you give a player a command block with multiple players?

2. Type the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.




  • How To Detect When A Player Is Standing On A Block In Minecraft || Insta Kill Or Launch Pad




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Oliver Sjöström, cottonbro, RODNAE Productions, cottonbro