How to create a reward GUI
Creating a rewards gui is simple, just create a new yml file in the UltraCollections/rewards folder and use the template provided in this page. With what you've learned from How the GUI system works, you know that you need to define a item icon in the stucture for the item to show up. So follow these steps:
Instructions
Create yml
Fill it with the template
We've defined a "I" in the structure, now go in-game and hold your rewards item and run this command:
/collections setreward <reward_file> <reward_name> <item_icon>
The
reward_fileis the file you just made WITHOUT THE .YML, so a dirt_reward.yml would bedirt_rewardThe
reward_nameis just a key lets set it tohelmetfor now.Now the
item_icon, as we already have anIin the stucture, lets useI.Here is your final command:
/collections setreward dirt_reward helmet I
Now the item is added to the config file and in the GUI in-game.
Template
GUI:
title: Dirt Level 2 Rewards
category_name: dirt_level_2
structure:
- '# # # # # # # # #'
- '# # # # # # # # #'
- '# # # # I # # # #'
- '# # # # # # # # #'
- '# # # # # # # # #'
- '# # # # C # # # #'
ingredients:
filler:
gui_item: BLACK_STAINED_GLASS_PANE
item_icon: '#'
item_name: '&f'
item-lore: []
custom_model_data: 1069
close:
gui_item: BARRIER
item_name: '&cClose'
item_icon: C
item-lore: []
actions:
opengui: farming
play_sound:
sound: ENTITY_ITEM_PICKUP
volume: 1.0
pitch: 1.0