Placeholder buttons
With the inventory system you can create buttons with placeholders to check if the player has a certain value or not. So you can do this with zAuctionHouse:

Check the number of expired items

Using the placeholder %zauctionhouse_expired_item% you can get the number of items that have expired for the player. So you can create a button like this:
1
expireItems:
2
type: INVENTORY
3
slot: 45
4
isPermanent: true
5
inventory: "expire"
6
placeHolder: "%zauctionhouse_expired_item%"
7
value: 1
8
action: SUPERIOR_OR_EQUAL
9
item:
10
material: CHEST
11
name: "&fExpire items"
12
lore:
13
- "&f» &7You have &b%zauctionhouse_expired_item% &7expired items"
14
else:
15
slot: 45
16
isPermanent: true
17
type: NONE
18
item:
19
material: CHEST
20
name: "&fExpire items"
21
lore:
22
- "&f» &7You have no pending items."
Copied!
You will therefore have a check of greater or equal on the number obtained with the placeholder. For example, if the player has 5 expired items, there will be 5 > 1 then the button will be displayed normally. But if the player with 0 items expired, there will be 0 > 1 and the button in the else will be displayed.
Last modified 8mo ago
Copy link