Placeholders
LuckyDrops exposes per-player drop-opening stats through PlaceholderAPI. Every time a player opens a drop, the drop type and the rarity it finished at (after all the clicks) are recorded, and these placeholders read those running totals.
These placeholders only work when the PlaceholderAPI plugin is installed. LuckyDrops registers its expansion automatically on startup when PlaceholderAPI is present, and does nothing extra when it is not. No extra download is needed: the luckydrops expansion is built in.
Available placeholders
| Placeholder | Returns |
|---|---|
%luckydrops_opened% | Total drops the player has opened (every type, every rarity) |
%luckydrops_opened_<type>% | Total drops of one type the player has opened |
%luckydrops_opened_<type>_<rarity>% | Drops of one type that finished at one rarity |
<type>is a drop type id (the drop file name without.yml, e.g.default).<rarity>is a rarity id from that drop (e.g.common,mythic).
Examples
%luckydrops_opened% -> 137
%luckydrops_opened_default% -> 120
%luckydrops_opened_default_mythic% -> 4
%luckydrops_opened_halloween% -> 17
%luckydrops_opened_halloween_spooky% -> 2
Use them anywhere PlaceholderAPI is supported, such as scoreboards, holograms, tab lists, or chat formats. For example, in a scoreboard line:
&7Lucky Drops opened: &e%luckydrops_opened%
&7Mythics found: &d%luckydrops_opened_default_mythic%
Behaviour notes
- A placeholder for a type or rarity the player has never opened returns
0, not a blank, so it is always safe to display. - The count is based on the rarity each drop finished at, after every click.
- Totals for a single type are the sum of that type's rarities; the grand total is the sum of everything. The stored numbers cannot drift out of sync.
- Stats for a drop type are kept even if that type is later deleted, so historical totals are not lost.
Where the data lives
Stats are stored one file per player under plugins/LuckyDrops/playerdata/<uuid>.yml:
opened:
default:
common: 5
rare: 3
mythic: 1
halloween:
spooky: 2
This file is written automatically whenever a player opens a drop. You normally never need to edit it by hand, but it is plain YAML if you want to inspect or reset a player's totals.