Basics
To create your custom reward GUI, you can use the "guis.yml" file. You can modify individual menus at any time, add or remove rewards as needed.
Click Actions
actions
The given actions can be executed at any type of click
left-click-actions
The given actions can be executed only when left clicked
righ-click-actions
The given actions can be executed only when right clicked
You can also link and manipulate GUIs to specify which one should be opened using click actions. Currently available click actions are:
[OPEN] - opens the specified menu
[CLOSE] - closes the currently opened menu
[MESSAGE] - closes the currently opened menu and sends the specified message to the player
[CONSOLE] - dispatches command trough the console
[PLAYER] - dispatches command as the player
[SOUND] - plays sound with specific volume and pitch, example:
BLOCK_NOTE_BLOCK_PLING,volume:0.1,pitch:1
[APPLY] - opens input menu for referral reward
[CREATE_REFERRAL] - creates a referral for a player
[TOGGLE_JOIN_NOTIFICATION] - toggles join notification for a player
[TOGGLE_LIVE_NOTIFICATIONS] - toggles live notifications for a player
[TOGGLE_JOIN_AUTO_CLAIM] - toggles join auto claim for a player
Menu Creation
Every menu has a required configuration consisting of 'title
', 'rows
', and 'content
'.
Make sure you use the item names appropriate for the version, if you use the wrong item name then the item will default to STONE
Here's an example of how you might set up a menu with these required configurations:
main:
title: "Main Rewards Menu"
rows: 5
filler: GRAY_STAINED_GLASS_PANE
inventory-type: CHEST # Available Types: CHEST, WORKBENCH, HOPPER, DISPENSER, BREWING
content:
13:
item: CHEST
name: "&aDaily Rewards"
lore:
- '&7Menu with daily rewards'
- ''
- '&b► Click to open'
action: '[open] dailyRewards'
40:
item: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjZkOGVmZjRjNjczZTA2MzY5MDdlYTVjMGI1ZmY0ZjY0ZGMzNWM2YWFkOWI3OTdmMWRmNjYzMzUxYjRjMDgxNCJ9fX0=
name: "&cClose"
lore:
- '&7Closes menu'
actions: # Example of multiple click actions
- "[close]"
- "[message] You have closed the menu"
This example will create an inventory with 5 rows (53 slots), set its title to 'Main Rewards Menu', and then set content with the following positions:
At position 13 in the inventory, a CHEST item is set with the specified parameters ('name
', 'lore
', and 'left-click-actions
' & 'right-click-actions
' or 'actions
' for both click actions). The 'action' parameter specifies what will happen when the player clicks on this item in the inventory. In this case, it will open the example menu 'dailyRewards'.
You can also specify whether the menu plays the defined sound when opened using sound
dailyRewards:
command: "daily"
title: "Daily Rewards Menu"
rows: 4
sound: BLOCK_NOTE_BLOCK_PLING
content:
13: exampleTimeReward
31:
item: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjZkOGVmZjRjNjczZTA2MzY5MDdlYTVjMGI1ZmY0ZjY0ZGMzNWM2YWFkOWI3OTdmMWRmNjYzMzUxYjRjMDgxNCJ9fX0=
name: "&cBack"
lore:
"&7Return to the main menu"
action: '[open] main'
Each menu can be assigned with the command
key a command that opens this menu.
Last updated