This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I want to make a command that teleports the player who pressed the button
Important Things: Teleports the player who pressed the button. and does not teleport the nearest player. (I need this information because I'm making a Minecraft server)
Thank you for listening
Hello,
To do this, you will need to use a datapack and custom advancements. First make a custom advancement:
#datapack/advancement/stone_button.json { "criteria": { "requirement": { "trigger": "minecraft:item_used_on_block", "conditions": { "location": { "block": { "blocks": [ "minecraft:stone_button" ] } } } } }, "rewards": { "function": "datapack:buttonpressed" } } # datapack/function/buttonpressed.mcfunction advancement revoke @s only datapack:stone_button tp X Y Z
Hope this helps!
-TechnoBro03
I want to make a command that teleports the player who pressed the button
Important Things: Teleports the player who pressed the button. and does not teleport the nearest player.
(I need this information because I'm making a Minecraft server)
Thank you for listening
Hello,
To do this, you will need to use a datapack and custom advancements. First make a custom advancement:
Hope this helps!
-TechnoBro03