Track statistics and deaths
Choose which statistics ExyliaSurvivalCore ranks, show leaderboards in menus, holograms and scoreboards, and tune how drops scatter on death. Kill rewards, bounties and graves live in other plugins.
The stats module counts what your players do (kills, deaths, blocks mined, crates opened, warps taken) and ranks them in leaderboards. The death module controls how drops fall when a player dies.
Kill rewards and streak payouts were dropped from this plugin: ExyliaCombat
pays for kills. Bounties on players' heads are also ExyliaCombat's now. Graves are
ExyliaGraves. None of them has a module, setting or command here any more. The
modules/kill-rewards, modules/bounties and modules/graves files left over from an older install are not
read.
Statistics#
Everything on the stats screen is a counter. Modules here count what their players do, and other Exylia
plugins feed the same table through the survival service. modules/stats/stats.yml decides which counters
are shown and ranked. It ships with 19 stats: kills, deaths, kdr, best_kill_streak,
current_streak, duels_won, balance, bounties_claimed, bounties_earned, votes_total,
votes_best_streak, market_sold, market_earned, blocks_mined, farming_harvested, crates_opened,
missions_completed, mobs_killed and playtime. Every one is enabled: true and ranked, except
current_streak. A stat with no counter feeding it (a bounty, vote or duel stat on a server without the
plugin that counts it) reads 0.
Show a leaderboard#
Pick the stat
Use the id of an entry in modules/stats/stats.yml, for example kills or blocks_mined. Make sure it
has leaderboard: true.
Open it from a menu
Bind the action survivalcore:stats_leaderboard <id> to a button, NPC or hotbar item to open that
board, or survivalcore:stats_open to open the player's own stats profile.
Or print it in a hologram or scoreboard
With PlaceholderAPI, use %exyliasurvivalcore_stats_top_name_<position>_<stat>% and
%exyliasurvivalcore_stats_top_value_<position>_<stat>%, for example position 1 of kills.
Boards include offline players. The full list is in the placeholder slice below.
| Placeholder | Shows | Example |
|---|---|---|
%exyliasurvivalcore_stats_kills% | Kills | 128 |
%exyliasurvivalcore_stats_deaths% | Deaths | 64 |
%exyliasurvivalcore_stats_kdr% | Kills over deaths, two decimals | 2.00 |
%exyliasurvivalcore_stats_streak% | The streak they are on | 4 |
%exyliasurvivalcore_stats_best_streak% | Their best ever | 11 |
%exyliasurvivalcore_stats_rank_<stat>% | Their position on that stat's board, or the unknown word | — |
%exyliasurvivalcore_stats_value_<stat>% | Their value for it, formatted, or the unknown word | — |
%exyliasurvivalcore_stats_counter_<key>% | A counter read straight through, as a plain number, `0` when nothing has counted it yet | — |
%exyliasurvivalcore_stats_top_name_<position>_<stat>% | The player at that place on the leaderboard of a stat, or a dash when nobody holds it. The position comes first: `%exyliasurvivalcore_stats_top_name_1_kills%`. | Steve |
%exyliasurvivalcore_stats_top_value_<position>_<stat>% | Their value, formatted. The position comes first: `%exyliasurvivalcore_stats_top_value_1_kills%`. | 128 |
Add a stat to the leaderboards#
Add a block to stats: in modules/stats/stats.yml, then run /survivalcoreadmin reload. For example,
to rank warps taken:
stats:
warps_taken:
enabled: true
type: COUNTER
counter: 'warps.used'
format: NUMBER
display-name: '{primary}&lWARPS'
icon: ENDER_PEARL
leaderboard: trueformat is NUMBER, DECIMAL, MONEY or TIME. leaderboard: false keeps a stat off the boards while
still showing it on the profile. A counter exists the moment a module counts it, and
%exyliasurvivalcore_stats_counter_<key>% reads any counter by its key as a plain number, whether or not
stats.yml lists it. Missions and seasons read the same counters: see
Missions and seasons.
The /stats command, with exyliasurvivalcore.stats and exyliasurvivalcore.stats.others, is in the code
but is not registered with the server, so typing it does nothing and looking at another player's stats
through it is not possible. The screens themselves work through the two actions above, and the viewer's own
profile and every leaderboard open normally.
Check that it works#
Open the screen from your menu button. You should see the stat with its icon and a ranked list. Counters are written every 60 seconds by default, so a new kill may take that long to show on a board.
Stat types, settings and counters
type | Where the number comes from |
|---|---|
COUNTER | A counter, named by counter. Left out, the stat's own id is used as the key |
COMPUTED | A formula over counters. KILLS_PER_DEATH is the only value formula accepts; anything else falls back to it |
STREAK | The kill streak the player is on now |
PLAYTIME | Time played, from ExyliaLib's playtime service |
PAPI | Any PlaceholderAPI name, set with placeholder |
VAULT | The player's balance |
A file that still says INTERNAL for kills, deaths, best_kill_streak or current_streak is read as
the counter or streak that replaced it.
| Setting | Default | What it does |
|---|---|---|
leaderboard-refresh-interval | 300 | Seconds between leaderboard rebuilds |
papi-sample-interval | 60 | Seconds between samples of a PAPI, VAULT or computed stat |
leaderboard-size | 100 | How deep a board goes |
counter-flush-interval | 60 | Seconds between writes of the counters that changed. Anything below 5 is treated as 5 |
ignored-mob-spawn-reasons | SPAWNER, SPAWNER_EGG, DISPENSE_EGG | Mobs that spawned this way do not count as mob kills (kills.mobs, missions). Names from Bukkit's SpawnReason |
These live under settings: in modules/stats/config.yml. A reload reschedules the timers with the new values.
Counters:
| Source | Counters |
|---|---|
| Stats (PvP) | kills.players, kills.best_streak, kills.mobs, kills.mob.<type>, deaths.total |
| Rankup, farming, reclaim | rankup.ranks, rankup.prestiges, farming.harvested, farming.<category>.harvested, reclaim.claimed, reclaim.<section>.claimed |
| Kits | kits.claimed, kits.<kit>.claimed |
| Warps, homes, spawn, back, tpa, rtp | warps.used, warps.<warp>.used, homes.teleports, homes.created, homes.deleted, spawn.teleports, back.used, tpa.teleports, rtp.used, rtp.<world>.used |
| Portals, jump pads | portals.used, portals.<portal>.used, jumpads.used, jumpads.<jumpad>.used |
| Repair | repair.items |
| Missions | missions.completed, missions.<pool>.completed, missions.earned |
| Fed by other plugins | mines.blocks, crates.opened, bounties.*, graves.*, duels.*, votes.*, rewards.claimed, market.*, auctions.*, orders.*, trade.completed, protections.*, lootchests.*, powerups.picked, afkzones.rewards, playtime.rewards |
Market, auction and order money counters also come per currency (market.<currency>.earned,
auctions.<currency>.spent, orders.<currency>.earned). The last row is fed by the Exylia plugins that now
own those features, where installed; the comment at the top of the shipped stats.yml lists the keys.
Keys are lower-cased, and one longer than 100 characters is ignored rather than cut short. Money counters
(.earned, .spent) add whole units. votes.best_streak is a best, not a sum.
Counting happens in memory. Changed counters are written every counter-flush-interval seconds, when a
player leaves and on shutdown, so a crash can lose at most that interval. While the stats module is off
nothing is counted, and what would have been is not kept for later.
Change what happens on death#
The death module has three settings in modules/death/config.yml:
| Setting | Default | What it does |
|---|---|---|
scatter-radius | 0.3 | How far drops are spread in blocks, so a stack is not one pile. 0 drops everything at the exact death spot |
fire-protection | true | Drops survive fire, but not lava |
custom-messages | true | The death line comes from messages.yml rather than vanilla |
The death broadcast respects each player's /settings preferences. When a grave plugin such as
ExyliaGraves takes the drops, the death module finds nothing left to scatter.
Something missing on this page? Tell us on Discord