Repository navigation
Releases: BentoBoxWorld/IslandStats
Release list
Release 1.0.0
Release Highlights
First release. IslandStats keeps statistics for each island rather than for each player. It starts with mob deaths: how many of each mob has died on an island, and how many of those a player killed.
- Mob kill and death counts per island: two stats for each mob type. One counts mobs killed by a player on the island. The other counts every mob that died there, including in mob farms.
- Stats dialog:
/<gamemode> statsopens a summary page and a page for each stat, listing mobs from most to fewest. Mob names show in each player's own client language. - Placeholders: island totals, per-mob counts and the island the player is standing on, ready for scoreboards, holograms and leaderboards.
- Admin view and reset:
/<gamemode>admin stats <player> [reset]. The console gets the stats as chat lines. - ⚙️ Light on the server: counting happens in memory, and changed islands are saved to the BentoBox database on a timer and at shutdown.
- 🔡 English locale: only
en-USships in this release.
Compatibility
✔️ BentoBox API 3.23.0 or later
✔️ Minecraft 26.2 and later
✔️ Java 25
Built against Paper 26.2 and BentoBox 3.23.3. Tested in game on Paper 26.3 with a BentoBox 3.23.3 snapshot and AOneBlock.
Installation
- Drop the jar into
plugins/BentoBox/addons/. - Restart the server.
- If you want to change the defaults, edit
plugins/BentoBox/addons/IslandStats/config.ymland restart.
| Permission | Default | What it allows |
|---|---|---|
[gamemode].island.stats |
true | /<gamemode> stats, which opens your island's stats |
[gamemode].admin.stats |
op | /<gamemode>admin stats <player> [reset] |
🔺 Counting starts when the addon is installed. IslandStats does not read old player statistics, so every island starts at zero.
🔺 Use the command for the world you're in.
/<gamemode> statsonly works in that game mode's world. For example, in the OneBlock world use the OneBlock command, not/is, so players who have islands in several game modes see the right one.
🔡 English only for now. Translations are welcome.
Legend
- 🔡 locale files may need to be regenerated or updated.
- ⚙️ config options have been removed, renamed, or added.
- 🔺 special attention needed.
New Features
Island mob statistics
[PR #1]
The addon keeps two counts for each mob type:
| Stat | Counts |
|---|---|
KILL_ENTITY |
Mobs killed by a player on the island. Same meaning as the vanilla KILL_ENTITY player statistic. |
ENTITY_DEATH |
Mobs that died on the island from any cause: players, mob farms, fall damage, lava. |
A death counts for the island whose protected area it happened in. Players and armor stands are not counted. Kills by visitors count toward KILL_ENTITY unless count-visitor-kills is turned off. Every death on the island always counts toward ENTITY_DEATH.
The addon doesn't use vanilla player statistics, because they only record kills where a player gets the credit and they don't record where the mob was. That would miss mob farms and credit the killer's island rather than the island the mob died on.
Stats dialog
[PR #1]
/<gamemode> stats opens a dialog using the BentoBox Dialogs API:
- The summary page shows a total for each stat, with a button to open it.
- Each stat page lists mobs from most to fewest, with Previous, Next, Back and Close buttons.
- Mob names are sent as translatable text, so each player sees them in their own language.
Placeholders
[PR #1]
These are registered for each game mode. With PlaceholderAPI they look like %IslandStats_bskyblock_island_kill_entity_zombie%.
| Placeholder | Value |
|---|---|
<gamemode>_island_<stat>_total |
Total for the player's island |
<gamemode>_island_<stat>_<entity> |
Count of one mob for the player's island |
<gamemode>_visited_island_<stat>_total |
Total for the island the player is standing on |
<stat> is kill_entity or entity_death, and <entity> is the lower case mob type, such as zombie or iron_golem.
Admin command
[PR #1]
/<gamemode>admin stats <player> shows that player's island stats: a player sees the dialog, and the console gets chat lines. Adding reset erases the island's stats after asking for confirmation.
⚙️ Storage and settings
[PR #1]
Stats are stored through the BentoBox database API, so they go into whatever database BentoBox is set up to use. There is one record per island. With the JSON database these are in plugins/BentoBox/database/IslandStatsData/. When an island is deleted or reset, its stats are deleted too.
config.yml options:
disabled-gamemodes: game modes to leave alone.count-visitor-kills(defaulttrue): whether kills by non-members count towardKILL_ENTITY.ignored-entities(defaultARMOR_STAND): mob types that are never counted.save-interval(default5): minutes between database saves. Stats are always saved when the server stops.dialog.page-size(default15): how many mobs to list on each dialog page.
For addon developers
Other addons can read counts through the manager:
long zombies = islandStats.getManager().getCount(island, IslandStat.KILL_ENTITY, EntityType.ZOMBIE);
long deaths = islandStats.getManager().getTotal(island, IslandStat.ENTITY_DEATH);What's Changed
- ⚙️ 🔡 Initial IslandStats addon by @tastybento in #1
Full Changelog: https://github.com/BentoBoxWorld/IslandStats/commits/1.0.0