Set Console Command for Block
give @p minecraft:diamond 1
@s = self · @p = nearest player · @a = all players · @e = all entities
Previous Output
-Intermediate · 2 blocks
Press a button to give the nearest player one diamond, then apply Speed from a Chain Block.
What you need
Expected result
The nearest player receives 1 diamond and Speed I for 10 seconds.
Placement direction
Configure one block at a time
The copy button copies only Command Input. Choose every other value in the Command Block screen.
Attach the button to the first Impulse Block.
give @p minecraft:diamond 1
@s = self · @p = nearest player · @a = all players · @e = all entities
-Set the Chain Block to Conditional so it runs only when giving the diamond succeeds.
effect give @p minecraft:speed 10 0 false
@s = self · @p = nearest player · @a = all players · @e = all entities
-If it does not work