Statistic Display - CommandLeo/scarpet GitHub Wiki

Info

An app to easily display statistics on the scoreboard. No manual setup required. Includes digs (even for offline players), bedrock removed by hand, cumulative stats and much more.
Everything while using only one scoreboard objective!

How to install

Installing the app is very easy, you just have to run a few commands in Minecraft. Make sure you have a recent Carpet Mod version installed (1.4.44 or higher).

  • /carpet scriptsAppStore CommandLeo/scarpet/contents/programs: this will tell Carpet where to find the script.
  • /script download stat.sc: this will download the script. It should give you an error (Error when handling of setting up [...] for custom type misc_stat) but it's nothing to worry about.
  • /script load stat: this will reload the script to make the error go away.

If you had an older version of the app installed then you might have to run /reload or, if it doesn't work, to restart the server.

Commands

/stat mined <block> - Amount of <block> mined

/stat used <item> - Amount of <item> used or placed

/stat crafted <item> - Amount of <item> crafted

/stat dropped <item> - Amount of <item> dropped

/stat picked_up <item> - Amount of <item> picked up

/stat broken <item> - Amount of <item> broken

/stat killed <entity> - Amount of <entity> killed

/stat killed_by <entity> - Amount of times <entity> killed you

/stat misc <misc_stat> - Misc statistics, e.g. play_time, deaths, mob_kills, aviate_one_cm

/stat extra <extra_stat> - Extra statistics that are not normally in the game, e.g. xp_level, ping, health, hunger

/stat bedrock_removed - Amount of bedrock removed by hand using pistons and tnt

/stat digs <dig> - Amount of digs (combined_blocks by default)

/stat combined <combined_stat> - Multiple statistics combined together

/stat print <category> <entry> [<player>] - Prints the value of a stat of a player

/stat hide - Hides the scoreboard

/stat show - Shows the scoreboard

/stat bots [on|off|toggle] - A shortcut for /stat settings bots_included

/stat settings bots_included [on|off|toggle] - Includes or excludes bots in the scoreboard

/stat settings default_dig <dig> - Sets the default dig type

/stat settings offline_digs [on|off|toggle] - Includes or excludes digs of offline whitelisted players in the scoreboard

/stat settings total [on|off|toggle] - Enables or disables the total in the scoreboard

/stat settings dig_display [on|off|toggle] - Shows or hides digs in the player list footer

/stat settings dig_display_color <hex_color> - Changes the color of digs display for yourself (leave empty to reset)

/stat settings stat_color <hex_color> - Changes the color of the scoreboard name for everyone (leave empty to reset)

/stat settings combined_stats list - Lists combined statistics

/stat settings combined_stats info <combined_stat> - Prints the entries of a combined statistic

/stat settings combined_stats create <name> <display_name> <category> <entries> - Creates a combined statistic

/stat settings combined_stats delete <combined_stat> - Deletes a combined statistic

/stat carousel start - Starts a carousel of statistics

/stat carousel stop - Stops the carousel

/stat carousel interval [<seconds>] - Gets or sets the interval of the carousel

/stat carousel list - Lists carousel entries

/stat carousel add <category> <entry> - Adds an entry to the carousel

/stat carousel remove <index> - Removes an entry from the carousel

Changelog

V2.3

  • Improved the combined stat system
  • Added the ability to create combined stats from block tags and item tags
  • Removed the default combined stats

V2.2

  • Improved hex color handling.
  • Cleaned up code.

V2.1

  • Added a setting to toggle the total.
  • Made the dig display hidden by default.
  • Made the dig count in the player list not show up if there's already another objective displayed in that slot.

V2

  • Completely rewrote almost all the code from scratch in order to improve performance and eliminate bugs.
  • Cross-version compatibility: the app works in 1.16, 1.17 and 1.18.
  • Added new dig types. The available ones currently are: combined_blocks (default; sum of all blocks mined), total (sum of all tool uses) and types for each kind of tool (pick, pickshovel, shovel, axe, hoe). Unlike total, combined_blocks counts blocks you destroyed by hand and can't be cheated by punching entities with a tool. The default dig type can be changed with /stat settings default_dig.
  • Statistics for whitelisted offline players are now available for all dig categories (can be disabled with /stat settings offline_digs).
  • A convenient dig display is now visible in the tablist (it won't interfere with carpet mod loggers). It can be customized/disabled with /stat settings dig_display and /stat settings dig_display_color. ⬛ = combined_blocks; ⚒ = total; ⛏ = pick.
  • Added extra statistics: ping, air, health, hunger, saturation, xp_level, bedrock_removed (/stat bedrock_removed is now just a shortcut).
  • Added combined statistics: cumulative statistics defined by the user with /stat settings combined_stat.
  • Added /stat print to print to chat the value of a stat of yours or of another player (even offline in the case of digs).
  • Added carousels, highly configurable statistic slideshows: iterate through a list of stats over a certain time period.
  • It's now possible to control certain aspects of the script with /stat settings, e.g. stat scoreboard color, dig display visibility/color, default dig type...
  • Playtime statistics now update in real time: play_one_minute (only for 1.16), play_time (1.17+), total_world_time (1.17+), time_since_death, time_since_rest.
  • Renamed custom statistics to misc statistics.
  • The displayed statistic now gets restored if the script is reloaded.
  • Statistic changes are now logged to console.
  • Improved the help menu and moved it to /stat help.
  • Display names are now stored externally and are dynamically downloaded when you download the app from the appstore.
  • Added a bedrock_removed scoreboard objective: this is completely unused in the app, but it may be useful when you have to fetch this statistic externally.
  • Fixed a bug that would make the Total appear under players in the scoreboard.
⚠️ **GitHub.com Fallback** ⚠️