Repository navigation
GUI Inventory
First, Check out this example from AGMRanks.
# Placeholders - This is a list of local placeholders that you can use!
# %rank_name% -> The name of rank
Title: '%rank_name%'
Size: 6
# Slots that will be filled with the reward icons
EmptySlots: [28, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43]
# Where rank icon should show up
RankIconSlots: [4]
Slots:
Border:
Slots: [
0-0 , 1-1 , 2-2 , 3-3 , 4-4 , 5-5 , 6-6 , 7-7 , 8-8 ,
9-1 , 11-3 , 12-4 , 13-5 , 14-6 , 15-7 , 17-9 ,
18-2 , 19-3 , 20-4 , 21-5 , 22-6 , 23-7 , 24-8 , 25-9 , 26-10,
27-3 , 28-4 , 29-5 , 30-6 , 31-7 , 32-8 , 33-9 , 34-10, 35-11,
36-4 , 37-5 , 38-6 , 39-7 , 40-8 , 41-9 , 42-10, 43-11, 44-12,
45-5 , 46-6 , 47-7 , 48-8 , 50-10, 51-11, 52-12, 53-13
]
Items:
- '12xAGMRanks:RedBorder'
- '3xAGMRanks:BlueBorder'
Menu:
Slots: [ 49 ]
Items: [ Menu ]
Accept:
Slots: [ 10-2 ]
Items: [ Accept ]
AltItems:
- '12xAGMRanks:RedBorder'
- '3xAGMRanks:BlueBorder'
Cancel:
Slots: [ 16-8 ]
Items: [ Cancel ]
AltItems:
- '12xAGMRanks:RedBorder'
- '3xAGMRanks:BlueBorder'
Items:
Menu:
CustomHead: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzY1Y2IxODVjNjQxY2JlNzRlNzBiY2U2ZTZhMWVkOTBhMTgwZWMxYTQyMDM0ZDVjNGFlZDU3YWY1NjBmYzgzYSJ9fX0=
Name: '&5&lReturn'
Accept:
Material: GREEN_CONCRETE
Name: '&a&lRank UP'
Cancel:
Material: RED_CONCRETE
Name: '&c&lCancel'At top of the file, you will see some placeholders commented, These are called Local Placeholders which take effect only inside this inventory.
If you see nothing at the top, It means there is no local placeholder for this inventory.
Holds the inventory title, And supports the placeholders!
Holds the inventory size in rows, from 1 up to 6.
For each set of items to be shown in the inventory, you need to define a key holding the details about the set.
The key used, might have an action linked to it, So do not change/remove a key defined by the plugin unless you know what you are doing.
Each set has 3 following keys:
Do not mistake this with the last one, It will hold all slots that should be filled with this set.
If you are using animations, You can specify an offset with a dash (-) for each slot. For example: 10-2 means set slot 10 with 2 update offset.
The items to be used in this set. You can only use GUI Item keys here.
If the item is specified inside this GUI Inventory, You can use the key directly.
But to call an item from AGMCore's library, you need to use a namespace, For example, to get RedBorder from agmranks.yml from the library you need to use 'agmranks:redborder'.
Note:
The keys are case insensitive, or in another word, are compared in lowercase.
Sometimes, The plugin has a condition for a set to be used. In this example, The Accept and the Cancel are only shown if the player affords the rank.
If the condition is not met, GUI Inventory will use AltItems instead.
This key is used to define local GUI Items and uses the same format as a GUI Item


