Repository navigation
Releases: betaheads/betaheads-stats
Releases · betaheads/betaheads-stats
Release list
1.3.0 mob kills, deaths, login/activity
What's added
Mob kill tracking (all mob types)
- New
BhEntityListeneronENTITY_DEATHresolves the killer viagetLastDamageCause()→EntityDamageByEntityEvent.getDamager()(projectile kills covered too). - All beta 1.7.3 mobs tracked: hostile (zombie, skeleton, spider, creeper, slime, zombie pigman, ghast, giant), peaceful (chicken, cow, pig, sheep, squid, wolf) and player kills.
Player deaths (new DEATH activity type)
- Broken down by cause: falling, drowning, lava, fire, explosion, mob, player, void, suffocation, lightning, cactus, other.
More tracked activities (all via existing activity_stats flow)
- Damage dealt/taken (half hearts) and arrow hits via
ENTITY_DAMAGE; events with no player involved are filtered out before scheduling anything. - Items picked up / dropped (by stack amount).
- Water/lava buckets filled and emptied.
- Nights slept, nether portals used, eggs thrown, chickens hatched.
- Signs written, paintings placed, fires started (flint & steel).
- Chat messages sent, commands used.
- Cows milked, sheeps dyed, wolves tamed (tame result checked one tick later, since taming is a random chance).
- Distance walked / by vehicle (meters) and time in Nether (seconds) via
TrackPlayersMovement— a sync task every 2 secs reads locations on the main thread (cheap math only) and hands accumulated increments to an async task; world changes and teleports excluded.
Login stats & last seen
- Migration
AddUserLoginColumnsaddsfirst_login_at,last_login_at,last_seen_at(DATETIME NULL) andlogin_counttousers. first_login_atis set only when the user record is created; staysnullfor pre-existing users.last_seen_atupdated on quit and by the periodic save task.
/stats command
- Whole command runs in an async task (
scheduleAsyncDelayedTask), reads only in-memory maps — no DB queries, main thread untouched. - First page shows logins count, first/last login (
dd.MM.yyyy HH:mm,-when null). - Title
--- Betaheads stats ---is configurable viastats.titleconfig option (defaults to the current text, so no config changes needed). /stats aoutput grouped by category (--- Common actions ---,--- Hostile mob kills ---, …) with rows sorted alphabetically inside each category; fixed page-number parsing (args[1], wasargs[0]="a"); a category header never ends a page — it moves to the next page unless at least one row fits under it.
Thread safety
- Stats maps switched to
ConcurrentHashMap(they're touched from multiple async scheduler threads). handleUserActivity/handleUserActionguard against users that already quit; counters support arbitrary increments.
1.2.1
- fixed case when user have empty activity stats
1.2!!!!!!
- sheared sheeps tracking
- fish caught tracking
v1.1.1
- add ability to store display name (include register)
v1.1.0
- Block statistic.
- Less blocking opirations, means less lags.
v1.0.2
Add mysql new/old auth method toggle.
Reduce jar file size.
dev: add maven.
1.0.1
v1.0.0
Functionality
- Total spendend time on server /stats command.