玩家统计
一款适用于 Minecraft 1.20.6 的 Fabric 模组,用于追踪每位玩家的统计数据并提供轻量级的游戏内经济系统。所有持久化数据均委托给 Custom Player Data 框架处理。
依赖要求
必须安装 custom-player-data-1.0.3 模组。
当前可用功能
追踪
- 首次加入 — 在玩家第一次连接时记录一次。
- 上次加入 — 每次连接时刷新。
- 游戏时长 — 以秒为单位累计。会话开始时间保存在内存中,并在断开连接(或作为安全网在
SERVER_STOPPING事件触发)时累加到已持久化的总时长中。/playerinfo和/leaderboard play_time会将当前进行中的会话时间添加到显示值中,以确保数字始终最新。
命令
| 命令 | 权限 | 描述 |
|---|---|---|
/playerinfo |
所有人 | 显示您自己的统计数据。游戏时长格式化为 X jours, Y heures, Z min。 |
/playerinfo <player> |
op (lvl 2) | 显示其他玩家的统计数据。 |
/leaderboard <stat> |
所有人 | 前十排行榜。基于当前在线玩家构建(该框架不暴露离线数据)。 |
连接计数器 — join_count
- 每次成功登录时增加
join_count。 - 在
/playerinfo中添加一行。
死亡追踪 — death_count
- 监听
ServerLivingEntityEvents.AFTER_DEATH事件,每当ServerPlayerEntity死亡时增加death_count。 - 通过
/leaderboard death_count提供death_count排行榜。 - 在
/playerinfo中添加一行。
玩家击杀追踪 — player_kills
- 当一名玩家击杀另一名玩家时,攻击者的
player_kills增加。 自杀情况会被过滤掉。 - 通过
/leaderboard player_kills提供player_kills排行榜。 - 在
/playerinfo中添加一行。
敌对生物击杀追踪 — mob_kills_hostile
- 每当玩家击杀一个敌对实体时,增加
mob_kills_hostile。 - 通过
/leaderboard mob_kills_hostile提供mob_kills_hostile排行榜。 - 在
/playerinfo中添加一行。
被动生物击杀追踪 — mob_kills_passive
- 每当玩家击杀一个被动实体时,增加
mob_kills_passive。 - 在
/playerinfo中添加一行“Mobs passifs tues”。
经济系统 — balance
整个经济模块受 BALANCE 统计项控制。激活它将解锁以下命令:
| 命令 | 权限 | 描述 |
|---|---|---|
/balance |
所有人 | 显示您的余额。 |
/balance <player> |
op (lvl 2) | 显示其他玩家的余额。 |
/pay <player> <amount> |
所有人 | 转账。如果源余额不足或目标为自身,则拒绝交易。 |
/money <player> give <amount> |
op (lvl 2) | 向玩家余额中添加金钱。 |
/money <player> take <amount> |
op (lvl 2) | 从玩家余额中扣除金钱 — 下限为零,不会变为负数。 |
/money <player> set <amount> |
op (lvl 2) | 将玩家余额设置为特定值。 |
激活 balance 还会在 /playerinfo 中添加一个样式化的“Solde”行,并在 /leaderboard 中添加一个 balance 条目。
语言支持
- 英语
- 法语
安装
- 为 Minecraft 1.20.6 安装 Fabric Loader:
- 下载适用于 1.20.6 的 Fabric API,并将
.jar文件放入mods/文件夹。 - 将
player-statistics.jar放入同一个mods/文件夹。 - 启动游戏!
Player Statistics
A Minecraft 1.20.6 Fabric mod that tracks per-player statistics and provides a lightweight in-game economy. All persistence is delegated to the Custom Player Data framework.
Requirements
The custom-player-data-1.0.3 mod must be installed.
Currently available features
Tracking
- First join — recorded once on the player's very first connection.
- Last join — refreshed on every connection.
- Play time — accumulated in seconds. The session start time is held
in memory and added to the persisted total on disconnect (or on
SERVER_STOPPINGas a safety net)./playerinfoand/leaderboard play_timeadd the in-progress session to the displayed value so the number is always current.
Commands
| Command | Permission | Description |
|---|---|---|
/playerinfo |
everyone | Show your own statistics. Play time is formatted as X jours, Y heures, Z min. |
/playerinfo <player> |
op (lvl 2) | Show another player's statistics. |
/leaderboard <stat> |
everyone | Top 10 leaderboard. Built from currently connected players (the framework does not expose offline data). |
Connection counter — join_count
- Increments
join_counton every successful login. - Adds a line to
/playerinfo.
Death tracking — death_count
- Listens to
ServerLivingEntityEvents.AFTER_DEATHand incrementsdeath_countwhenever aServerPlayerEntitydies. - Exposes a
death_countleaderboard via/leaderboard death_count. - Adds a line to
/playerinfo.
Player kill tracking — player_kills
- Increments
player_killson the attacker when one player kills another. Self-kills are filtered out. - Exposes a
player_killsleaderboard via/leaderboard player_kills. - Adds a line to
/playerinfo.
Hostile mob kill tracking — mob_kills_hostile
- Increments
mob_kills_hostilewhenever a player kills an hostile entity. - Exposes a
mob_kills_hostileleaderboard via/leaderboard mob_kills_hostile. - Adds a line to
/playerinfo.
Passive mob kill tracking — mob_kills_passive
- Increments
mob_kills_passivewhenever a player kills an passive entity. - Adds a "Mobs passifs tues" line to
/playerinfo.
Economy — balance
The whole economy module is gated behind the BALANCE stat. Activating it
unlocks the following commands:
| Command | Permission | Description |
|---|---|---|
/balance |
everyone | Show your own balance. |
/balance <player> |
op (lvl 2) | Show another player's balance. |
/pay <player> <amount> |
everyone | Transfer money. Refused if the source balance is insufficient or the target is yourself. |
/money <player> give <amount> |
op (lvl 2) | Add money to a player's balance. |
/money <player> take <amount> |
op (lvl 2) | Remove money — clamped at zero, never negative. |
/money <player> set <amount> |
op (lvl 2) | Set a player's balance to a specific value. |
Activating balance also adds a styled "Solde" line to /playerinfo and a
balance entry to /leaderboard.
Language support
- English
- French
Installation
- Install Fabric Loader for Minecraft 1.20.6:
- Download Fabric API for 1.20.6 and drop the
.jarinto yourmods/folder. - Drop
player-statistics.jarinto the samemods/folder. - Launch the game!
下载 Player Statistics Utils
下载 Player Statistics Utils
下载 Player Statistics Utils
下载 Player Statistics Utils
下载 Player Statistics Utils
下载 Player Statistics Utils
下载 Player Statistics Utils
修复漏洞与经济系统
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧