How image prefixes work
Minecraft chat can only show text. A resource pack can add new characters to a font, and ItemsAdder turns any PNG into such a character, called a font image. Once the pack is loaded, the badge is just one more character in the line.
Three plugins share the work:
- ItemsAdder builds the resource pack and replaces
%img_<name>%(PlaceholderAPI) or its own:<name>:tag with the badge character. - LuckPerms stores which group wears which prefix and decides by priority when a player has several.
- Your chat and tab plugins read the LuckPerms prefix, through Vault or the PlaceholderAPI placeholder
%luckperms_prefix%, and display it. LuckPerms itself does not format chat.
Step 1: Make the badge images
Design your ranks in the Rank Prefix Generator. Each badge is 8 pixels tall by default, as the ItemsAdder wiki asks, and as wide as its text. Put the ranks in order: the top of the list gets the highest LuckPerms priority. Set a namespace (the folder name, ranks by default) and press Download all as ZIP.
The ZIP contains one PNG per rank, a ranks.yml and a README with every command:
ranks/
configs/ranks.yml
textures/admin.png
textures/vip.png
README.txtStep 2: Add the font images to ItemsAdder
Copy the ranks folder into plugins/ItemsAdder/contents/. The config registers every badge as a font image:
info:
namespace: ranks
font_images:
admin:
permission: "ranks.admin"
show_in_gui: true
suggest_in_command: false
path: "admin.png"
scale_ratio: 8
y_position: 7
vip:
permission: "ranks.vip"
show_in_gui: true
suggest_in_command: false
path: "vip.png"
scale_ratio: 8
y_position: 7scale_ratio: 8matches the 8 pixel image, so one image pixel is one font pixel, andy_position: 7puts the badge on the text line. If you pick another height, the generator changes both values with it. ItemsAdder requiresy_positionto be lower than or equal toscale_ratio.- The
permissionline only decides who may type the badge as a chat emoji. Who wears it in front of the name is decided by LuckPerms. pathpoints to the PNG in the namespace'stexturesfolder.
Run /iazip in the console and wait until the resource pack is rebuilt. Players see badges only once they have loaded the new pack.
Step 3: Set the prefix with LuckPerms
Create the groups if they do not exist yet, then set the prefix of each group. The generator writes these lines for all ranks at once:
lp creategroup admin
lp creategroup vip
lp group admin meta setprefix 20 "%img_admin% "
lp group vip meta setprefix 10 "%img_vip% "
lp user Steve parent add vip- The number is the priority. If a player is in several groups, LuckPerms shows the prefix with the highest priority. The generator gives the top rank the highest number, in steps of ten.
setprefixreplaces existing prefixes of that group in the same context.addprefixwould add another one next to them.- The quotes are needed because the prefix ends with a space, which keeps the badge apart from the name.
- Remove a prefix with
lp group vip meta removeprefix 10.
Do you want several badges in a row, for example a rank badge and a donor badge? LuckPerms can stack prefixes with the meta-formatting section in its config.yml (format, duplicates, start-spacer, middle-spacer, end-spacer).
Step 4: Show the badge in chat and tab
The prefix now contains %img_admin%. Something has to replace that placeholder with the badge. The chat or tab plugin must show the LuckPerms prefix and parse PlaceholderAPI placeholders inside it.
- Install PlaceholderAPI and the LuckPerms expansion:
/papi ecloud download LuckPerms, then/papi reload. - Use
%luckperms_prefix%in your chat format, or let the chat plugin read the prefix through Vault. - For the tab list, the ItemsAdder wiki shows the TAB plugin with the image placeholder directly in the group prefix and then
/tab reload:
Admin:
tabprefix: '%img_admin% '
tagprefix: '%img_admin% 'ItemsAdder's own :admin: tag works where ItemsAdder replaces text itself. Plugins that only understand PlaceholderAPI need %img_admin% instead, which is why the generator uses the placeholder form.
Text prefixes without a resource pack
If you do not want a resource pack, coloured text prefixes work too. The generator also writes them with &# hex colours and bold:
lp group vip meta setprefix 10 "ɗAD&lVIP &r"Hex colours need Minecraft 1.16 or newer and a chat plugin that understands &#RRGGBB. For chat plugins that read MiniMessage, copy the MiniMessage lines with <gradient> instead. More about colour formats is in the guide to MOTD colours, hex and gradients.
Common errors and fixes
| What you see | Cause and fix |
|---|---|
%img_vip% appears as text | The chat or tab plugin does not parse PlaceholderAPI in the prefix, or PlaceholderAPI is missing. |
| An empty box instead of the badge | The pack was not rebuilt with /iazip, or the player still has the old pack. Rejoin after the rebuild. |
| No prefix at all | The chat plugin does not show the LuckPerms prefix. Check Vault or %luckperms_prefix% in its format. |
| The wrong badge is shown | Priorities. The highest number wins, so check them with lp group <name> meta info. |
| Two badges for one player | The group has two prefixes from addprefix. Use setprefix, or set up stacking on purpose. |
| The badge sits too high or low | Another resource pack moves the chat font. Change y_position (not higher than scale_ratio) and run /iazip again. |
The same font image technique also draws whole menu backgrounds, see custom GUI backgrounds in DeluxeMenus with ItemsAdder. And if your ranks come with vote perks, the guide to vote rewards with VotingPlugin shows how to hand them out.