Skip to content

LuckPerms rank prefixes with image badges (ItemsAdder)

Many servers show small pixel badges like VIP or ADMIN in front of player names instead of coloured text. Behind each badge is a font image from the server resource pack, and LuckPerms only stores a placeholder for it. This guide shows the whole chain: the ItemsAdder config, the LuckPerms commands, the priorities and the chat and tab plugins that make the badge visible.

Updated:

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.zip
ranks/
  configs/ranks.yml
  textures/admin.png
  textures/vip.png
README.txt

Step 2: Add the font images to ItemsAdder

Copy the ranks folder into plugins/ItemsAdder/contents/. The config registers every badge as a font image:

plugins/ItemsAdder/contents/ranks/configs/ranks.yml
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: 7
  • scale_ratio: 8 matches the 8 pixel image, so one image pixel is one font pixel, and y_position: 7 puts the badge on the text line. If you pick another height, the generator changes both values with it. ItemsAdder requires y_position to be lower than or equal to scale_ratio.
  • The permission line only decides who may type the badge as a chat emoji. Who wears it in front of the name is decided by LuckPerms.
  • path points to the PNG in the namespace's textures folder.

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:

Console
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.
  • setprefix replaces existing prefixes of that group in the same context. addprefix would 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.

  1. Install PlaceholderAPI and the LuckPerms expansion: /papi ecloud download LuckPerms, then /papi reload.
  2. Use %luckperms_prefix% in your chat format, or let the chat plugin read the prefix through Vault.
  3. For the tab list, the ItemsAdder wiki shows the TAB plugin with the image placeholder directly in the group prefix and then /tab reload:
plugins/TAB/config.yml (groups)
  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:

Console
lp group vip meta setprefix 10 "&#0599AD&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 seeCause and fix
%img_vip% appears as textThe chat or tab plugin does not parse PlaceholderAPI in the prefix, or PlaceholderAPI is missing.
An empty box instead of the badgeThe pack was not rebuilt with /iazip, or the player still has the old pack. Rejoin after the rebuild.
No prefix at allThe chat plugin does not show the LuckPerms prefix. Check Vault or %luckperms_prefix% in its format.
The wrong badge is shownPriorities. The highest number wins, so check them with lp group <name> meta info.
Two badges for one playerThe group has two prefixes from addprefix. Use setprefix, or set up stacking on purpose.
The badge sits too high or lowAnother 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.

Frequently asked questions

How do servers show rank images in chat?

With a resource pack. Each badge is a font image, a custom character. ItemsAdder builds it into the pack and replaces a placeholder like %img_vip%, which you put into the LuckPerms prefix.

Do players need to download anything?

Image badges need the server resource pack, which ItemsAdder can send when players join. Text prefixes with colour codes need nothing.

Which prefix wins if a player has several groups?

By default the one with the highest priority, the number in meta setprefix. With the meta-formatting section in the LuckPerms config you can also show several prefixes in a row.

What size should rank icons be?

The ItemsAdder wiki asks for 8 pixel images. The generator sets scale_ratio to the image height (8) and y_position to 7, so the image is drawn 1:1 and stays sharp. The width follows the text.

Sources

Checked against the official documentation: