Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate]

Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate] - Opened carton boxes and stacked books placed on shabby wooden desk with tape against white wall

I have been working on getting a server up and running and I don't want to use anything but NBT data edits and command blocks no plugins, but any who I'm very tired and cant seem to wrap my head around this so I'm asking someone else, I have this snippet of code:

/tellraw @p ["",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"Confirmed!\",\"color\":\"green\"}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Confirm","color":"green"}]}}},{"text":"/","color":"dark_gray","bold":"false"},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"Cancelled\",\"color\":\"red\"}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Cancel","color":"red"}]}}}]

I believe I found that somewhere on Arqade and I need a book through the /give. I believe the when opened will present you with 3 options 1 for the world spawn 1 for nether(or just another set of /tp cords that I can change the xyz to what I need as I do not think you can travel between dimensions via commands) and 1 for the end if you could help that would be awesome



Best Answer

You can either do 2 things to get the player out of other dimensions with commands. Kill the player and turn on the keep inventory game-rule then teleport them to spawn or teleport the player to a end portal then teleport them to spawn. Here is the end portal method but you will have to press ESC every time you teleport to spawn from the nether or the end. You will have to make 2 end portals some where in the nether and the end for this to work.

/scoreboard objective add tp trigger
/scoreboard objective add tp1 dummy
/trigger tp set 1 (use this cmd to teleport to spawn)

/scoreboard players enable @a tp
/scoreboard players set @a[score_tp_min=1,score_tp=1] tp1 0
/scoreboard players reset @a[score_tp_min=1] tp
/scoreboard players set @a[score_tp1_min=0,score_tp1=0] tp1 1 {Dimension:1}
/scoreboard players set @a[score_tp1_min=0,score_tp1=0] tp1 -1 {Dimension:-1}
/tp @a[score_tp1_min=-1,score_tp1=-1] x y z (nether end-portal)
/tp @a[score_tp1_min=1,score_tp1=1] x y z (end end-portal)
/scoreboard players set @a[score_tp1_min=-1,score_tp1=-1] tp1 2
/scoreboard players set @a[score_tp1_min=1,score_tp1=1] tp1 2
/tp @a[score_tp1_min=0,score_tp1=0] x y z (spawn)
/scoreboard players reset @a[score_tp1_min=0,score_tp1=0] tp1
/scoreboard players set @a[score_tp1_min=2,score_tp1=2] tp1 0



Pictures about "Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate]"

Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate] - Opened cardboard boxes and stack of books placed on wooden shabby table near tape with scissors against white plain wall
Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate] - Crop unrecognizable male packing staked books into carton box while standing against white wall during relocation
Making a book with clickable buttons to move to Spawn, The Nether and The End [duplicate] - Books placed inside opened carton box



How do you make a clickable book in Minecraft?

In Java Edition, when used via the execute command, can teleport between the Overworld, the Nether and the End: To teleport the executing player to the same coordinates, but in the Nether: execute in minecraft:the_nether run teleport ~ ~ ~



How To Make Custom Books/Clickable Books | Minecraft 1.17




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

Images: Karolina Grabowska, Karolina Grabowska, Karolina Grabowska, Karolina Grabowska