Placeholders & tags
How Nexo glyph tags, ItemsAdder images and PlaceholderAPI tags keep working after the move to CraftEngine.
Other plugins' messages, menus and scoreboards were written for Nexo or ItemsAdder. Rather than editing all of them, CraftEngineConverter rewrites the old tags into what CraftEngine draws, wherever text is shown.
Tags it rewrites
| Tag | From | Setting (config.yml) |
|---|---|---|
<glyph:name> | Nexo glyphs | tag.nexo-glyph.enabled |
:name: | ItemsAdder images | tag.itemsadder-image.enabled |
<placeholderapi:placeholder>, <papi:placeholder> | PlaceholderAPI | tag.placeholder-api.enabled |
A tag is rewritten to the converted emoji or image, so the glyphs must have been
converted first (/cec convert <plugin> EMOJIS and IMAGES). A tag with no
converted equivalent is left as it is.
Where they are rewritten
Each place can be turned off in config.yml under formatting:
| Key | Where |
|---|---|
packet-events | Outgoing packets (needs PacketEvents) |
boss-bar | Boss bars |
action-bar | Action bars |
plugin-message | Messages sent by plugins |
title | Titles and subtitles |
menu-title | Inventory (menu) titles |
PlaceholderAPI
With PlaceholderAPI installed and img-placeholderapi-support on in
itemsadder.yml (the default), the plugin registers one placeholder:
| Placeholder | Returns |
|---|---|
%img_<name>% | The converted CraftEngine image for ItemsAdder's <name> |
It is the same placeholder ItemsAdder provides, so text using it keeps working once ItemsAdder is gone.
For developers
Other plugins can resolve the same tags through the ITagResolver service:
ITagResolver resolver = getServer().getServicesManager()
.getRegistration(ITagResolver.class)
.getProvider();Last updated on