Using /trigger to restrict a datapack
Hey all! I've made a working datapack for an "invitation" system (tl;dr it just teleports you to a certain location using a function) but I'm trying to restrict it to only be used in books. Basically it was unusable by players, and I used a Trigger command with a scoreboard to bypass that, but now anyone can just use it. I've tried to restrict it to a single item but no luck...any tips? :/