Actions and Requirements related to Item
This is not easy as you thought, please read the BetterGUI wiki first, then read this carefully
- All the items you want to use in the menus will be stored in a special file
- That file is called
config.yml
and it's located in the addon folder (In this case, it's onplugins/BetterGUI/addon/ItemGotcha
)
- The config should be easy if you are familiar with Button and, particularly, Dummy Button
- Yes, you can think of the
config.yml
as a Menu setup, but with dummy buttons - Therefore, if you want to make an item, you can set it up in the
config.yml
as how you did in your menu (Name, Material, Lore, etc) - Also, here are some example items that I made just to demonstrate
stone:
id: STONE
amount: 32
advanced_stone:
id: STONE
amount: "32 + 5"
name: "&c{player}'s Stone"
lore:
- "A dummy Stone"
- ''
- "&kYes, it's very dummy and stupid"
Just a simple command to get yourself the items you made
Command | Permission | Description |
---|---|---|
giveitem |
bettergui.items | Give an item to the player |
- The format
give: <item>
give: <item>, <amount>
give: <material>, <amount>
- This action will give the player the
<item>
(specified in theconfig.yml
) or the<material>
with the<amount>
- Example (with the example
config.yml
)give: stone
give: advanced_stone
give: DIAMOND_SWORD
give: STONE, 10
- The format
item: <item>
item:
value: <item>
take: <true/false>
item: <item>, [amount]
item:
value: <item>, [amount]
take: <true/false>
item: "<item>, [amount]: [format]"
item:
value: "<item>, [amount]: [format]"
take: <true/false>
- This requirement will check if the player has the
<item>
(specified in theconfig.yml
) in his inventory - You can set the
amount
value to specify the amount of<item>
the requirement should check - You can set the
format
value with 2 valuestrue
if you want the requirement to convert the<item>
to the final item and check that item with the player's inventoryfalse
if you want the requirement to check simplier (the material, then item modifiers, and finally the amount).
- You can set the
take
value (true
orfalse
) to allow/disallow the plugin to take the items of the player alter checking successfully - Example
item: "stone"
item: "stone, 10"
item: "stone:false"
item: "stone, 10:false"
item:
value:
- "stone:true"
- "cobblestone"
take: false