Repository navigation
Release 1.0.0 - #1
Merged
Merged
Conversation
Keeps statistics per island rather than per player, starting with mob deaths: KILL_ENTITY (killed by a player on the island) and ENTITY_DEATH (died on the island from any cause, including mob farms), per entity type. - Counts from EntityDeathEvent with a cheap early-exit handler and an in-memory cache; one database record per island via the BentoBox database API, saved on a timer and at shutdown, deleted with the island - /<gamemode> stats shows paged dialog pages (BentoBox Dialogs API) - /<gamemode>admin stats <player> [reset] for admins and the console - Placeholders for island totals, per-mob counts and the visited island - Targets BentoBox 3.23.3, Paper 26.2, Java 25 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- getIslandName: read the island name once, so a null is never returned where @nonnull is promised (reliability), and drop a null check on PlayersManager.getName, which never returns null - Drop always-false user null checks in the placeholders - Admin execute returns false if called without a successful canExecute - Unnamed catch variables, a stream for the dialog lines, and test tidy-ups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



First release of IslandStats: statistics kept per island rather than per player, starting with mob deaths.
What's in it
EntityDeathEventat MONITOR, with early exits for players, ignored types and non-game-mode worlds, then one island grid lookup and an in-memory increment. Two stats per entity type:KILL_ENTITY(killed by a player on the island) andENTITY_DEATH(died on the island from any cause, including mob farms).IslandStatsDatarecord per island keyed by island id. Lazy-loaded and cached, dirty records saved everysave-intervalminutes and on shutdown. Deleted with the island (resets included, since BentoBox deletes the old island)./<gamemode> statsopens a summary dialog and per-stat pages (paged, highest first, mob names client-translated). Must be run in that game mode's world./<gamemode>admin stats <player> [reset]; console gets chat output, reset asks for confirmation.<gamemode>_island_<stat>_total,<gamemode>_island_<stat>_<entity>,<gamemode>_visited_island_<stat>_total.Testing
Note on history
masterstarts from an empty root commit that was merged intodevelop, so this PR shows the whole addon for review.🤖 Generated with Claude Code