Teleporter pad command Minecraft



  • I am new to command blocks, and was wondering if a block in the floor topped with a pressure plate and coded with this code would work as a teleporter between tower floors, where the player just walks on it and clicks which floor name to go to for compact teleporting:

    scoreboard players enable @a question 
    /tellraw @a ["",{"text":"Where to?"
    ,"color":"gold","bold":"true"},{"text":"LOCATION NAME1","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/trigger question set 1"}},{"text":"LOCATION NAME2","color":"none","bold":"true","clickEvent":{"action":"run_command","value":"/trigger question set 2"}},{"text":"LOCATION NAME3","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/trigger question set 3"}}] 
    execute @a[score_question=1] /tp @p × × ×
    execute @a[score_question_min=2] /tp @p × × ×
    execute @a[score_question_min=3] /tp @p × × ×
    


  • You don't need to type all of those commands, Just give yourself a sign with this command:

    /give @p oak_sign{BlockEntityTag:{Text1:"{\"text\":\"LocationName\",\"color\":\"black\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/tp @s (cordinates) (rotation)\"}}",id:"Sign"}}
    

    After that if you right click on that sign you will teleport in the cordinates you've selected. (@s means who is clicking the sign.)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2