Custom compass

How can i make an compass, that, when i right click with it on mainhand, opens an chest gui with players head and i when i select an player the compass Will show the player direction?

Continue to help post