Buttons
Buttons are the basic foundation of the plugin, they are very important to be able to manage your configuration. Here you have all available button types and an example of their use.
Button types:
NONE
NONE_SLOT
BACK
HOME
PREVIOUS
NEXT
INVENTORY
PERFORM_COMMAND
AUCTION_ITEM
BUY_INVENTORY
SHOW_ITEM
REMOVE_ITEM
BUY_ITEM
CHANGE_SORT
CATEGORIES
REMOVE_ALL
SELL_INVENTORY_SLOT
SELL_INVENTORY_ACCEPT
SELL_INVENTORY_CANCEL
CLAIM
Default
Here is the information that is valid for all button types.
typeSets the type of the button.slotSets the button slot.isPermanentAllows you to set a button as permanent, so the paging system will not take this button into account (you must set the value to true).itemAllows you to define the item to be displayed (Add an item)permissionAllows you to give permission to the.elseMessageAllows you to send a message to the user when they do not have permission to click a button.elseDisplays another button if the user does not have permission.actionAllows you to choose the formula for the verification with place holder, you haveSUPERIOR,LOWER,SUPERIOR_OR_EQUAL,LOWER_OR_EQUAL,EQUALS_STRINGandEQUALSIGNORECASE_STRINGplaceHolderAllows to check an API placeholder variablevalueAllows you to set the value for placeholder verificationsoundAllows you to have a sound when the player clicks on the button. You have the list of sounds available here: XSoundvolumeChanging the sound volumepitchChanging the sound pitch
Example:
block:
item:
material: GRASS_BLOCK
name: "&aBlocks"
lore:
- "&7Click to access the blocks"
type: INVENTORY
inventory: "blocks"
slot: 20
sound: BLOCK_NOTE_BLOCK_PLING
volume: 1.3f
pitch: 0.8fNONE
Description:
This type allows you to display a single item, no interaction is possible.
Example:
example:
item:
material: GRASS_BLOCK
name: "&cRandom name"
type: NONE
slot: 0NONE_SLOT
Description:
The type with the same works as the NONE type but allows to display the same item on several slots. Example:
slots:
type: NONE_SLOT
item:
material: GRAY_STAINED_GLASS_PANE
name: "&e"
slots:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8slotsSet button slots.
BACK
Description:
Returns to the previous inventory.
Example:
back:
item:
material: BARRIER
name: "&cBack"
type: BACK
slot: 49HOME
Description:
Returns to the main inventory.
Example:
home:
item:
material: BARRIER
name: "&eHome"
type: HOME
slot: 49PREVIOUS
Description:
Returns to the previous page
Example:
previous:
type: PREVIOUS
isPermanent: true
slot: 48
item:
material: ARROW
name: "&fPrevious"
else: #Displays another button if there is no previous page.
slot: 48
type: PREVIOUS
isPermanent: true
item:
material: AIRNEXT
Description:
Go to the next page
Example:
next:
type: NEXT
isPermanent: true
slot: 50
item:
material: ARROW
name: "&fNext"
else: #Displays another button if there is no next page.
slot: 50
type: NEXT
isPermanent: true
item:
material: AIRINVENTORY
Description:
Allows you to move between inventories. Please note that you can only move between inventories with a default type, otherwise you may get errors.
Example:
block:
item:
material: GRASS_BLOCK
name: "&aBlocks"
lore:
- "&7Click to access the blocks"
type: INVENTORY
inventory: "blocks"
slot: 20Value:
inventoryAllows you to define the name of the inventory to which you want to go.
PERFORM_COMMAND
Description:
Allows the player to execute commands. And thus to navigate in the inventories of other plugin for example
Example:
commands:
type: PERFORM_COMMAND
item:
material: EMERALD
name: "&eClick for execute command"
slot: 30
commands:
- "bc %player% est vraiment trop beau"
closeInventory: trueValue:
commandsList of commands that will be executed by player.consoleCommandsList of commands that will be executed by console.closeInventoryAllows you to close the inventory before the commands are executed.consolePermissionCommandsAllows commands to be executed at the console only if the player has permission.consolePermissionPermission for the list above
AUCTION_ITEM
Description:
Allows you to display the list of items in an inventory.
Example:
slots:
type: NONE_SLOT
item:
material: GRAY_STAINED_GLASS_PANE
name: "&e"
slots:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8CLAIM
Description:
Allows to display the list of intems according to the inventory.
Example:
claim:
type: CLAIM
isPermanent: true
slot: 51
else:
type: NONE
item:
material: MINECART
name: "&fClaims money"
lore:
- "&f» &7You have no money on hold"
item:
material: HOPPER_MINECART
name: "&aClaims money"
lore:
- "&f» &7You have &d%zauctionhouse_claim_vault%$&7 to claim"slotsSet button slots.
SELL_INVENTORY_SLOT
Description:
Allows the list of items contained in an AuctionItem of inventory type. Can only be used in the SELL_SHOW and SELL inventory type.
Example:
items:
type: SELL_INVENTORY_SLOT
slots:
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 19
- 20
- 21
- 22
- 23slotsSet button slots.
SELL_INVENTORY_ACCEPT
Description:
Allows you to accept the sale of an inventory. Can only be used in the SELL inventory type.
Example:
accept:
type: SELL_INVENTORY_ACCEPT
slot: 50
item:
material: GREEN_STAINED_GLASS_PANE
name: "&fSell content"SELL_INVENTORY_CANCEL
Description:
Allows you to cancel the sale of an inventory. Can only be used in the SELL inventory type.
Example:
cancel:
type: SELL_INVENTORY_CANCEL
slot: 48
item:
material: RED_STAINED_GLASS_PANE
name: "&fCancel"SELL_INVENTORY_BUY
Description:
Allows you to purchase inventory directly from the SELL_SHOW inventory. Can only be used in the SELL_SHOW inventory type.
Example:
buy:
type: SELL_INVENTORY_BUY
slot: 48
item:
material: GREEN_STAINED_GLASS_PANE
name: "&fBuy for &b%zauctionhouse_price% %zauctionhouse_currency%"CHANGE_SORT
Description:
Allows you to change the sort type for items, usable only in the AUCTION inventory type.
Example:
informations:
type: CHANGE_SORT
slot: 49
isPermanent: true
item:
material: NETHER_STAR
name: "&fInformations"
lore:
- "&7&m-------------------------------------"
- "&f&l» &7Welcome to the auction house"
- "&f&l» &7it's a market where all the players"
- "&f&l» &7can sell or buy items."
- ""
- "&f&l» &7To be able to sell items you must do"
- "&f&l» &a/ah sell &7<&aprice&7> &8[&7<&fnumber of items&7>&8]"
- ""
- "&f&l» &7Number of items available&7: &b%zauctionhouse_counts%"
- "&f&l» &7Sort type&7: &b%zauctionhouse_sorting%"
- "&f&l» &7Click to &bchange &7the sort type"
- "&7&m-------------------------------------" REMOVE_ALL
Description:
Allows you to remove all items that are in the ITEMS, EXPIRE and BUYING inventory.
Example:
removeall:
type: REMOVE_ALL
isPermanent: true
item:
material: BLUE_STAINED_GLASS_PANE
name: "&cRemove all"
slot: 45CATEGORIES
Description:
Displays a button to access a category. Can only be used in the CATEGORIES inventory.
Example:
block:
type: CATEGORIES
category: "blocks"
item:
material: GRASS_BLOCK
name: "&fCategory: Block"
lore:
- "&f» &7There are &b%zauctionhouse_category_item_blocks% &7items in the blocks category."
slot: 20
weapons:
type: CATEGORIES
category: "weapons"
slot: 21
item:
material: DIAMOND_SWORD
name: "&fCategory: Weapons"
lore:
- "&f» &7There are &b%zauctionhouse_category_item_weapons% &7items in the blocks weapons."categoryAllows you to give the name of the category to be opened.
BUY_ITEM
Description:
Allows to confirm the purchase of an item, usable only in the inventory BUY_CONFIRM.
Example:
buy1:
type: BUY_ITEM
item:
material: GREEN_STAINED_GLASS_PANE
name: "&aBuy"
slot: 1REMOVE_ITEM
Description:
Allows you to confirm the cancellation of the sale of the item, usable only in the inventory REMOVE_CONFIRM.
Example:
remove1:
type: REMOVE_ITEM
item:
material: GREEN_STAINED_GLASS_PANE
name: "&aRemove"
slot: 1 SHOW_ITEM
Description:
Displays the item to be purchased or remove, usable only in the inventory REMOVE_CONFIRM and BUY_CONFIRM.
Example:
show:
type: SHOW_ITEM
slot: 13Last updated
Was this helpful?