Skip to content

Releases: betaheads/betaheads-stats

1.3.0 mob kills, deaths, login/activity

Choose a tag to compare

@volkovmikhail volkovmikhail released this 09 Jul 11:29

What's added

Mob kill tracking (all mob types)

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

1.2.1

Choose a tag to compare

@volkovmikhail volkovmikhail released this 23 Aug 21:11
  • fixed case when user have empty activity stats

1.2!!!!!!

Choose a tag to compare

@volkovmikhail volkovmikhail released this 23 Aug 19:16
  • sheared sheeps tracking
  • fish caught tracking

v1.1.1

Choose a tag to compare

@volkovmikhail volkovmikhail released this 19 Mar 19:30
  • add ability to store display name (include register)

v1.1.0

Choose a tag to compare

@volkovmikhail volkovmikhail released this 09 Mar 16:01
  • Block statistic.
  • Less blocking opirations, means less lags.

v1.0.2

Choose a tag to compare

@volkovmikhail volkovmikhail released this 29 Jan 20:57

Add mysql new/old auth method toggle.
Reduce jar file size.
dev: add maven.

1.0.1

Choose a tag to compare

@volkovmikhail volkovmikhail released this 26 Dec 22:16

Patch

fixed mysql connector

v1.0.0

Choose a tag to compare

@volkovmikhail volkovmikhail released this 26 Dec 20:46

Functionality

  • Total spendend time on server /stats command.