You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New BhEntityListener on ENTITY_DEATH resolves the killer via getLastDamageCause() → 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.
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 AddUserLoginColumns adds first_login_at, last_login_at, last_seen_at (DATETIME NULL) and login_count to users.
first_login_at is set only when the user record is created; stays null for pre-existing users.
last_seen_at updated 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 via stats.title config option (defaults to the current text, so no config changes needed).
/stats a output grouped by category (--- Common actions ---, --- Hostile mob kills ---, …) with rows sorted alphabetically inside each category; fixed page-number parsing (args[1], was args[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/handleUserAction guard against users that already quit; counters support arbitrary increments.