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
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:
As you may have noticed, a textured skull (base64) was used in this example. In addition, models from Oraxen, ItemsAdder plugin or your own custom model can also be used. More about this here.
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 'action
'). 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
Each menu can be assigned with the command
key a command that opens this menu.
Last updated