-
Notifications
You must be signed in to change notification settings - Fork 49
GUI Configuration
lucian929 edited this page Mar 19, 2022
·
15 revisions
By default, HMCCosmetics includes one cosmetic GUI, and one extra GUI (dye-menu.yml). However, you can create as many GUIs as you need.
To do this, just create a second file in the menus
folder, and copy the contents from main.yml
to that file.
You can create a button to open the next page with the open-menu: <menu_name>
option:
26:
material: PAPER
name: "<#F7DCFA>Next Page"
amount: 1
model-data: 1
action:
any:
open-menu: dye-menu
The action system allows you to define different events for different click types. The current options are LEFT
, MIDDLE
, RIGHT
, and ANY
.
# Open the specified menu
open-menu: <MENU>
# Play a sound
sound:
name: "minecraft:block.chain.break"
volume: 1.0
pitch: 1.0
category: "BLOCKS"
# Remove cosmetics currently applied to the player
remove-cosmetics:
- BOOTS
- CHEST_PLATE
- HAT
# Send a message to the player
send-message: "<red>My test message!"
# Send multiple messages to the player
send-messages:
- "<gray>Message 1"
- "<red>Message 2"
# send a command, format is <sender:command>
# senders can be player or console
send-command: "player:give %player% diamond"
# Send multiple commands, format is <sender:command>
send-commands:
- "player:help"
- "console:give %player% gold_ingot"
Open the dye menu only when equipping the cosmetic:
action:
equip:
any:
open-menu: dye-menu
These are currently undocumented as I haven't had the time to do it, but you can read the comments to get an idea.
action:
# when the action should be run
# equip = when a cosmetic is equipped
# remove = when a cosmetic is removed
# any all = default, does not need to be specified
equip:
# click type
any:
send-message: "on equip"
remove:
any:
send-message: "on-remove"
any:
# send a message
send-message: "Test first message"
# send a command, format is <sender:command>
# senders can be player or console
send-command: "player:give %player% diamond"
# list of messages
send-messages:
- "Message 1"
- "Message 2"
# list of commands
send-commands:
- "player:help"
- "console:give %player% gold_ingot"
# set items in the specified slots in the inventory
# works with all actions
# sets items in the next inventory if open-menu is specified
set-items:
12:
material: PAPER
name: "<red>Backpack"
lore:
- ""
- "<gray>Enabled: <#6D9DC5>%enabled%"
- "<gray>Allowed: <#6D9DC5>%allowed%"
locked-lore:
- "<red>You do not own this item!"
amount: 1
model-data: 4
type: BACKPACK
permission: ""
id: backpack
THIS WIKI IS DEPRECATED! PLEASE VISIT https://docs.hibiscusmc.com/