How to create a Custom GUI?

I am creating a Minecraft vanilla mini games server and I want to create a custom GUI, but as far as I know there is no way to do this without a Bukkit server. I want to make it so it will /testfor a compass in a player's hand. When the player has a compass, it will /summon a donkey without a saddle, and with a chest on the player's head. When the player left clicks with the compass, it will open the donkey's chest GUI. Then, I want to make it so there is already items in the chest, but an unsure how.


Solution 1:

Use /replaceitem. It will allow you to set items in the donkey's chest. Then, give each item a custom name. Testfor it being in a player's inventory, then preform the necessary action