Icons
Use <icon:name> to put an item sprite or a player head in kit names, menus and messages.
File: plugins/MineDuels/icons.yml. Reload: /md reload. The reference is icons.yml.
An icon is a small picture inside text. Write <icon:name> in a kit display-name, a menu name or lore, a message or the scoreboard.
# kits/uhc.yml
display-name: "<icon:uhc> <gold>UHC"Define an icon
mode: auto
icons:
sword:
atlas: items
sprite: item/iron_sword
fallback: "<gray>🗡</gray>"
heart:
atlas: gui
sprite: hud/heart/full
fallback: "<red>❤</red>"
steve:
head: Steve
fallback: "<yellow>☻</yellow>"| Key | Meaning |
|---|---|
atlas | The texture atlas of the sprite: items, blocks or gui |
sprite | The sprite in the atlas, for example item/iron_sword |
head | A player name or UUID, to show their face. Use this instead of atlas and sprite |
fallback | MiniMessage text shown where sprites cannot be |
Mode
mode | Behaviour |
|---|---|
auto | A sprite on a server that can send object components (Minecraft 1.21.9 and newer), the fallback otherwise |
text | Always the fallback |
sprite | Always a sprite. A wrong sprite shows the missing texture |
PlaceholderAPI values are plain text, so there the fallback is always used.
Which sprite
| The icon is | Use |
|---|---|
| A normal item (sword, potion, mace) | atlas: items, sprite: item/<name> |
| A block item (hay bale, crafting table) | atlas: blocks, sprite: block/<face>, for example block/hay_block_top or block/crafting_table_top |
| The shield | There is no flat texture. Use another item sprite, or only a fallback |
| A heart or other HUD picture | atlas: gui, sprite: hud/heart/full |
Sprite names follow the game's own texture names for your Minecraft version. A name that does not exist shows the missing texture, so test with mode: sprite and look at it.
A head
steve:
head: Steve
fallback: "<yellow>☻</yellow>"<icon:steve> shows Steve's face. To show the face of the player who sees the text, use the built-in <mdhead:Name> tag, which is not part of icons.yml.
Icon in the menu item versus in the name
These are two different things:
| Setting | Where it shows |
|---|---|
icon: DIAMOND_SWORD in a kit file | The item in the queue menu slot (a material) |
display-name: "<icon:sword> ..." | A picture inside the text of a name |
icons.yml entries | The pictures <icon:name> can use |
Troubleshooting
| You see | Cause and fix |
|---|---|
| A purple and black square | The sprite does not exist. Check atlas and sprite, or use mode: text |
| An emoji instead of a picture | The server or client cannot show sprites. This is the fallback working. Use mode: text to make it the same for everyone |
| Nothing | The name in <icon:name> does not match a key in icons.yml |
Related: Queue customization, Icons for kits, Placeholders.