Styles & Dialogs
Filescenarios/arena-styles.ymlA menu can have the right words in the wrong colour, or a name that lost its bold. Style checks look at colours, bold, italic and glint on titles, item names and lore. Dialogs get their own pair of steps: one checks what the dialog shows, the other fills it in and presses a button.
- do: expectTitle
title: "ᴀʀᴇɴᴀ" # regex on the title text
color: "#ff3b3b"
- do: expectSlot
slot: 12
material: player_head
count: 1
glint: false
nameRuns: {text: "Max Players", color: "#7ee081", bold: true, italic: false}
lore: {line: 1, text: "4 players", color: white}
- do: expectDialog
title: {text: "Rename arena", color: gold}
type: multi_action
inputs: {name: text} # or a list of keys
buttons: [Save, Cancel] # label regexes that must exist
- do: answerDialog
button: Save
inputs: {name: Nacht}
expectWindow: "Arena" # optionalHow a style check matches
- A style check picks the part of the text its
textregex matches. colorpasses when any run in that part has the color, so a gradient passes with any of its colors.bold,italic,underlinedandstrikethroughmust hold for every visible run there. A flag the item does not set counts as false.- Colors can be names (
gold) or hex, in any case.
Text is matched as written and with small caps read as plain letters, so title: zombies finds a menu called ᴢᴏᴍʙɪᴇꜱ │ ᴀʀᴇɴᴀꜱ.
Slots
| Parameter | Checks |
|---|---|
slot | Which slot |
material | The item type |
count | The stack size |
glint | The enchantment glint, true or false |
nameRuns | The style of the part of the name that text matches |
lore | A plain regex, or a map that checks one line (1-based) or any line |
item, custom | Still work as before |
The first slot that passes wins, and a failure says which check failed on which slot. With absent: true the step passes once no slot of the open window matches.
Dialogs
| Step | Parameters |
|---|---|
expectDialog | title (text or a style map), type, inputs (a map like {name: text}, or a list of keys), buttons (label regexes that must exist) |
answerDialog | button, inputs (by key, like {name: Nacht}), expectWindow (optional) |
Every other step is on the Step Reference.