Lore & Display
The running totals are shown as a block of lore lines appended to the item. dStattrack owns those lines and rebuilds them on every change.
How the lore block works
Section titled βHow the lore block worksβEach group has its own lore template in config.yml under lore:
lore: kills: - '' - '<dark_purple><bold>dStattrack:</bold></dark_purple>' - '<white><bold>Β»</bold></white> <gray>Players killed: <yellow>%playerkills%' - '<white><bold>Β»</bold></white> <gray>Mobs killed: <yellow>%mobkills%' block: - '' - '<dark_purple><bold>dStattrack:</bold></dark_purple>' - '<white><bold>Β»</bold></white> <gray>Blocks broken: <yellow>%block%' fishing: - '' - '<dark_purple><bold>dStattrack:</bold></dark_purple>' - '<white><bold>Β»</bold></white> <gray>Fish caught: <yellow>%fishing%'- Lines are MiniMessage β use any tags, gradients and colours.
- Placeholders are replaced with the comma-formatted counter value:
%playerkills%,%mobkills%,%block%,%fishing%. - The first empty
''line is a spacer between the itemβs own lore and the stattrack block.
Why it never duplicates
Section titled βWhy it never duplicatesβdStattrack records how many lore lines it added in a hidden NBT tag (bStatLoreLines). On every update it removes exactly that many trailing lines before re-appending the freshly rendered block. So:
- Editing the template and re-applying never stacks two blocks.
- The itemβs own existing lore (enchant descriptions, etc.) above the block is left untouched.
/dstattrack removedeletes exactly the lines it owns.
If you change a
loretemplate in config, already-stattracked items keep their old lore until their counter next changes (a kill, aset, etc.) triggers a rebuild.
Number formatting
Section titled βNumber formattingβCounts are formatted with thousands separators (US locale), so 1234567 displays as 1,234,567.