📘Interface Guide
How to edit and add interface items.
Overview
All interface items can be found in the interfaces.yml
file. Interface items are designed to execute a action when clicked.
Supported Actions
buy - Buy selected shop item
sell - Sell selected shop item
next_page - Next shop page
previous_page - Previous shop page
display - Display selected shop item
back - Previous menu
command - Runs listed commands
none - Does nothing
Create Interface In-Game
Create the interface:
/shop create interface <name>
If you followed these steps you should now know how to create interfaces in-game. Keep in mind the menu will need to exist already to create a interface for it.
Create Interface YAML
Open the
interfaces.yml
and create a new key under the keyinterfaces
. You'll want to match the size of the menu or default interface.Restart the server or reload the plugin.
Add Interface Item In-Game
Get the item you want to add and put it in your main-hand slot. You can also edit the item if needed with
/shop item
.While holding the item run the command
/shop add interface <interface> <action> <slot> <action-amount/commands>
.The action will be what is done when clicked. Action amount will define the value used for your selected action. The slot is the location you would like the item to show in the menu.
If you ran that command the item you are holding should now be added to the target interface. No restart or reload needed.
Remove Interface Item In-Game
Open the menu that has the interface item you want to remove and sneak-click it. If you're OP it should give you a copy of the shop display item.
Now with that item in your hand run the command
/shop remove interface <interface>
.If you ran that command the item you are holding should now be removed from the target interface. No restart or reload needed.
Last updated