Advanced lore
Minimessage
Lore can contain tags like <arrow> and <red> and <bold>. These tags are added by MiniMessage.
You can find a full list of MiniMessage tags here.
Here are a few examples of what you can do with minimessage.
Simple color
| en.yml | |
|---|---|

Hex color
| en.yml | |
|---|---|

Gradient
| en.yml | |
|---|---|

Formatting
| en.yml | |
|---|---|

Best practice
Avoid using too much color in item lore and names. Ideally, you shouldn't highlight 'baguette' like we did in the above examples, because there's no practical reason to.
It can be tempting, but there are so many items in Pylon that it quickly becomes a mess! It's better to use colors and formatting (bold, italics, etc) in special cases. For example, the Loupe highlights 'The examined item will be consumed' in red because it's very important to know before using the Loupe!
Pylon's custom tags
The fun doesn't end there - Pylon adds its own MiniMessage tags! You've already met the <arrow> tag added by Pylon. There are two other very important tags that Pylon adds: <insn> (instruction) and <attr> (attribute).
You can find a full list of Pylon's custom tags here.
Instructions (<insn>)
This tag is just a shorthand to highlight text in a specific color. We use it to indicate an instruction:
| en.yml | |
|---|---|

Attributes (<attr>)
This is another shorthand for highlighting text in a specific color, this time used for attributes:
| en.yml | |
|---|---|
Best practice
Put description first, then instructions, then attributes, as shown in the above example. This helps keep things consistent across all of Pylon's items.

'But hold on!' you say. 'Didn't we just add a setting to change the burn time? It's not necessarily always 2 seconds!'
You'd be correct. And that's where placeholders come in.
Placeholders
Sometimes, we need to communicate values from the code to the lore, like the burn time. This can be done with placeholders. A placeholder is just an indicator, like %burn-time% which says 'something will be substituted here'.
The PylonItem class has a method called getPlaceholders. This method - when implemented - returns a list of placeholders to substitute into the item's lore. Let's implement it for BaguetteFlamethrower:
Now we can use that placeholder in the item lore. The placeholder is the string you supplied, surrounded by % - so in this case %burn-time%:
| en.yml | |
|---|---|

Best practice
Always use placeholders instead of hardcoding values, so the values in the lore are always correct.
Units
In the example above, we're manually adding 'seconds' - but Pylon has a units API we can use. This API can automatically choose how to format the unit. It's very simple to use:
| en.yml | |
|---|---|

You can find a full list of Pylon's default units here.
Best practice
Use the unit system instead of hardcoding in units. This means the same unit looks the same across all items, and all values are formatted in the same way.