Content generated with AI — it may contain mistakes.

ExyliaSurvivalCore/GuidesUpdated in v1.2.2

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.

Page 6 of 385 min read

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, bounties and graves moved out

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.

PlaceholderShowsExample
%exyliasurvivalcore_stats_kills%Kills128
%exyliasurvivalcore_stats_deaths%Deaths64
%exyliasurvivalcore_stats_kdr%Kills over deaths, two decimals2.00
%exyliasurvivalcore_stats_streak%The streak they are on4
%exyliasurvivalcore_stats_best_streak%Their best ever11
%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:

yaml
stats:
  warps_taken:
    enabled: true
    type: COUNTER
    counter: 'warps.used'
    format: NUMBER
    display-name: '{primary}&lWARPS'
    icon: ENDER_PEARL
    leaderboard: true

format 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.

/stats does not exist at runtime

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
typeWhere the number comes from
COUNTERA counter, named by counter. Left out, the stat's own id is used as the key
COMPUTEDA formula over counters. KILLS_PER_DEATH is the only value formula accepts; anything else falls back to it
STREAKThe kill streak the player is on now
PLAYTIMETime played, from ExyliaLib's playtime service
PAPIAny PlaceholderAPI name, set with placeholder
VAULTThe 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.

SettingDefaultWhat it does
leaderboard-refresh-interval300Seconds between leaderboard rebuilds
papi-sample-interval60Seconds between samples of a PAPI, VAULT or computed stat
leaderboard-size100How deep a board goes
counter-flush-interval60Seconds between writes of the counters that changed. Anything below 5 is treated as 5
ignored-mob-spawn-reasonsSPAWNER, SPAWNER_EGG, DISPENSE_EGGMobs 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:

SourceCounters
Stats (PvP)kills.players, kills.best_streak, kills.mobs, kills.mob.<type>, deaths.total
Rankup, farming, reclaimrankup.ranks, rankup.prestiges, farming.harvested, farming.<category>.harvested, reclaim.claimed, reclaim.<section>.claimed
Kitskits.claimed, kits.<kit>.claimed
Warps, homes, spawn, back, tpa, rtpwarps.used, warps.<warp>.used, homes.teleports, homes.created, homes.deleted, spawn.teleports, back.used, tpa.teleports, rtp.used, rtp.<world>.used
Portals, jump padsportals.used, portals.<portal>.used, jumpads.used, jumpads.<jumpad>.used
Repairrepair.items
Missionsmissions.completed, missions.<pool>.completed, missions.earned
Fed by other pluginsmines.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:

SettingDefaultWhat it does
scatter-radius0.3How far drops are spread in blocks, so a stack is not one pile. 0 drops everything at the exact death spot
fire-protectiontrueDrops survive fire, but not lava
custom-messagestrueThe 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