So basically I am trying to make it so you rename the paper and when you click the renamed piece of paper in the anvil it makes you execute that command. Here's the code I'm working with right now. The issue is that it always says "Unknown Command" and when I have it broadcast the event item's name it broadcasts "<null>".
command /command:
trigger:
open anvil inventory named "&8&lWrite cmd here!" to player
set slot 0 of player's current inventory to paper named "ex: CMD"
on inventory click:
if name of event-inventory is "&8&lWrite cmd here!":
cancel event
if event-slot is 2:
set {_cmd} to "%name of event-item%"
broadcast {_cmd}
wait 1 tick
make player execute command {_cmd}
close player's inventory
command /command:
trigger:
open anvil inventory named "&8&lWrite cmd here!" to player
set slot 0 of player's current inventory to paper named "ex: CMD"
on inventory click:
if name of event-inventory is "&8&lWrite cmd here!":
cancel event
if event-slot is 2:
set {_cmd} to "%name of event-item%"
broadcast {_cmd}
wait 1 tick
make player execute command {_cmd}
close player's inventory