How to enable sethome and home on a Vanilla Minecraft Server

I've seen some Vanilla Minecraft servers that use books with a teleport home, set home, and tp to spawn options. I found an app that I can use to build the custom book, but I can't figure out how to allow players to set home, automatically get books when they die/first spawn, etc. Is there somewhere with some good tutorials for doing this in vanilla, or does anybody know how to get this to work?
I found this video, and I even downloaded the world to try and test it out. It works okay in the downloaded world, but I can't reproduce it in my world. The main issue, I think, is I can't figure out how the command blocks/glowstone lamps are being powered. If I could see the wiring behind things, I could maybe reproduce it.
I can't seem to find a lot out there on this. Any help would be really appreciated!
Best Answer
For the first spawn you'll have to make a scoreboard objective (call it what you like) and then there is a command that goes something like this (don't ctrl+ c it it wont work is just goes something like this...)
/testfor @p[maximum_scorebored_objective_{objective name}=0]
You then hook that up to some redstone and another command block which gives them the stuff you want to give them when they first spawn.
Good luck!
Pictures about "How to enable sethome and home on a Vanilla Minecraft Server"



Can you set home in vanilla Minecraft?
Q: How can I give players permission to set named homes? A: You will need to install a permissions plugin, either LuckPerms, or Vault & a Vault supported permissions plugin then apply the permission "homes. sethome" to the (player or group) you would like to allow the usage of multiple homes for.Server Commands in Vanilla Minecraft! /tpa, /sethome, and /back!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Katerina Holmes, Mister Mister, Katerina Holmes, Katerina Holmes