⭐ Advanced Player Stats 3.0 ⭐
“Minecraft 玩家数据的情报层。”
✔ 独立插件 • ✔ 代理式递归 AI • ✔ 独立回退机制 • ✔ 双命令路由 • ✔ 极低 TPS 影响 • ✔ 隐私优先
MC 版本: 1.16 – 1.21.x • JAR 大小: ~40 KB • 依赖: NSR-AI(可选,用于 AI 功能) • 高度优化
? Advanced Player Stats 是什么?
Advanced Player Stats (APS) 3.0 是一个新一代的统计与隐私生态系统。作为原生构建的 Standalone Spigot/Paper Plugin(由旧版 v2 插件升级而来),APS 桥接了原始数据库日志与用户交互。
它以 两种截然不同的模式 运行:
- 生态模式(配合 NSR-AI): 将你的服务器数据转化为一个可交互的代理式数据库,玩家可以与 “StatsMaster”——一位理解自然语言、能扫描玩家物品栏、处理复杂比较并自动使用自定义 Minecraft 颜色格式化输出的 AI 人格——进行对话。
- 独立模式(无 AI): 作为一个轻量级、超高速的统计追踪插件运行。通过集成的基于 Levenshtein 算法的 模糊匹配引擎 即时纠正拼写错误;如果 AI 后端离线,则回退到优化的文本命令。
? 双操作模式:有 AI 与无 AI
1. ? AI 挂钩模式(代理式递归推理)
当与 NSR-AI 集成时(通过动态 Java 反射钩子),APS 引入了 递归智能:
- 动态上下文注入: 当玩家询问 “我现在的状况如何?” 时,插件会立即将其实时生命体征(生命值、饥饿度、在线时长、AFK 状态)注入 AI 的短期记忆中。
- 递归标签解析: 为了避免向 AI 发送庞大的数据库转储(这会浪费令牌带宽),AI 使用内部 标签系统(例如
[TYPE:PlayerName,kills,deaths])。插件在生成过程中拦截这些标签,针对本地玩家数据解析请求,并将特定答案反馈给 AI。
- 物品栏网格扫描: AI 可以使用
[TYPE:PlayerName,inventory] 查询实时物品栏。插件会格式化玩家主物品栏、副手和护甲槽的 9x4 网格,使 StatsMaster 能够回答诸如 “我有足够的金子制作金苹果吗?” 之类的问题。
- 比较引擎: AI 可以一次性解析和查询多名玩家的数据(例如
[TYPE:Steve,stats][TYPE:Alex,stats]),动态检索并比较数据,以加冕最佳狙击手或挖矿冠军。
- 主权 API 密钥: 优先使用玩家的个人 API 密钥进行 AI 生成,如果缺少密钥,则回退到服务器的全局密钥或标准模糊命令。
2. ⚡ 独立模式(高性能回退)
如果缺失 NSR-AI 或加载失败,APS 会自动切换到强大的本地回退机制:
- 模糊搜索引擎: 使用 Levenshtein 距离算法 来匹配用户输入。如果玩家输入
/aps stats saksk hlth,引擎会将 saksk 匹配为 Saksh,将 hlth 匹配为 health,从而返回正确结果。
- 无需 API 密钥: 所有命令均在 100% 本地运行,零外部网络请求。
- 直接命令行: 完全功能的
/aps 命令通过清晰、响应迅速的文本格式快速向玩家提供统计数据。
?️ 隐私主权与技术设计
细粒度隐私控制
APS 的设计遵循 隐私设计(Privacy-by-Design) 原则。玩家对其指标拥有绝对的主权:
- 使用
/aps privacy <feature> [on|off],玩家可以切换任何统计类别的可见性。
- 如果玩家将某项统计(如
kills)设置为 off,无论是命令请求还是 AI 查询都会返回 [PRIVATE]。StatsMaster AI 被指示尊重此标签,并礼貌地拒绝向其他玩家披露该特定指标。
- 管理员(或拥有
nsr-ai.admin.privacy.bypass 权限的玩家)可以绕过隐私过滤器进行调查。
坐标保护
- 安全位置追踪: 位置统计仅追踪当前维度/世界名称(例如
world_nether、world_the_end),绝不存储或泄露坐标(X、Y、Z)。这防止了坐标滥用和追踪。
极低 TPS 影响的架构
- 异步 I/O: 统计增量通过 Spigot 监听器在主线程上跟踪,但所有数据库读写和 AI 请求都在后台 Bukkit runnable(每 1200L / 60 秒间隔)上异步运行,以确保最小的主线程性能开销。
- UUID 索引存储: 玩家数据保存在结构化的干净 YAML 文件中(
plugins/Advanced-Player-Stats/playerdata/{UUID}.yml),防止索引损坏。
⚔️ 完整的分析组合(29 项统计)
APS 3.0 追踪大量指标,分类如下:
? 常规与生命体征
- Playtime — 在服务器上玩游戏的总活跃时间(在后台任务中异步更新)。
- Times Joined — 跟踪唯一登录会话的数量。
- Health — 监控当前生命值状态。
- Hunger — 实时追踪食物等级状态。
- AFK Status — 检测玩家当前是否处于离开键盘状态。
- AFK Time — 累计在 AFK 模式下花费的总时间。
- Location Context — 安全地追踪当前维度/世界,而不泄露坐标。
⚔️ 战斗与精准度分析
- 玩家击杀 — 在 PvP 中被击败的其他玩家总数。
- 总死亡次数 — 玩家死亡的总次数。
- 击杀/死亡比 (K/D) — 计算玩家的 PvP 效率。
- PVP 击杀连胜 — 追踪在不死亡的情况下连续击杀玩家的次数。
- 弓箭命中率 — 命中箭矢数量占射出箭矢总数的百分比。
- 弩命中率 — 命中弩箭数量占射出弩箭总数的百分比。
- 总伤害输出 — 对所有实体造成的累计最终伤害。
- 总受到伤害 — 累计受到的最终伤害。
- 最高单次伤害 — 记录单次攻击造成的最大最终伤害。
- 盾牌格挡 — 记录使用盾牌成功防御的攻击次数。
? 详细死亡统计
- 玩家致死 — 由其他玩家在 PvP 战斗中导致的死亡。
- 生物致死 — 由敌对生物导致的死亡。
- 环境致死 — 由自然灾害(岩浆、坠落伤害、溺水、虚空、后缀伤害)导致的死亡。
? 移动与体能活动
- 行走距离 — 以米/方块为单位的总移动距离。
- 跳跃次数 — 记录跳跃的总次数。
- 潜行时间 — 处于潜行状态的总活跃时间。
⛏️ 挖掘、进度与社会互动
- 破坏方块数 — 任意类型方块的总破坏数量。
- 放置方块数 — 任意类型方块的总放置数量。
- 珍贵矿石追踪 — 监控任何以
_ORE 结尾的方块以及远古残骸。
- 合成物品数 — 通过合成菜单创建的总物品数量。
- 附魔物品数 — 进行附魔的物品总数(通过附魔台或铁砧)。
- 生物击杀数 — 击杀的被动和敌对生物总数。
- 聊天总数 — 发送的聊天消息总计数。
- 平均聊天长度 — 每条聊天消息的平均字符数。
- 实时背包扫描 — 不可见且 AI 可读的玩家护甲和背包网格(护甲栏、副手栏及主 9x4 网格)扫描。
⚙️ 指令与权限
命令索引
-
/aps stats <player> [stat] — 查看玩家的完整统计数据或查询特定数据(例如 /aps stats Saksh bow_accuracy)。
-
/aps privacy <feature|all> [on|off] — 手动管理你的统计数据的可见性设置。
-
/aps help — 显示插件帮助菜单。
-
/aps migrate — (仅限管理员) 运行自愈迁移工具,将配置文件和玩家文件从 v2.x 迁移至 v3.0。
-
/aps <自然语言问题> — (仅限 AI) 直接与 StatsMaster AI 对话(例如,/aps compared to Steve, how many diamonds have I mined?)。
权限索引
nsr-ai.advancedplayerstats.view — 允许查看统计信息(默认:OP)。
nsr-ai.advancedplayerstats.view.inventory — 允许查看玩家物品栏统计信息(默认:OP)。
nsr-ai.advancedplayerstats.admin — 访问管理员设置和迁移引擎。
nsr-ai.admin.privacy.bypass — 绕过玩家个人资料中的隐私限制。
? 自愈合升级与迁移
从 Advanced Player Stats 2.x 升级的过程非常平滑。
- 将新的
Advanced-Player-Stats-3.0.jar 放入你的 plugins/ 目录中。
- 启动服务器。
- 以操作员(OP)身份登录并运行
/aps migrate。
- 迁移引擎会在
plugins/NSR-AI/addons/NSR-AI-Advanced-Player-Stats 下找到旧文件,自动将所有玩家统计数据及配置转移到 plugins/Advanced-Player-Stats/ 中,并记录结果。
将原始数据转化为智能且尊重隐私的游戏玩法洞察。
由 BlackForge Studio 开发
⭐ Advanced Player Stats 3.0 ⭐
“The Intelligence Layer for Minecraft Player Data.”
✔ Standalone Plugin • ✔ Agentic Recursive AI • ✔ Standalone Fallback • ✔ Dual-Command Routing • ✔ Minimal TPS Impact • ✔ Privacy-First
MC Versions: 1.16 – 1.21.x • JAR Size: ~40 KB • Requires: NSR-AI (Optional, for AI features) • Highly Optimized
? What is Advanced Player Stats?
Advanced Player Stats (APS) 3.0 is a next-generation statistics and privacy ecosystem. Built natively as a Standalone Spigot/Paper Plugin (upgraded from the legacy v2 addon), APS bridges raw database logs and user interaction.
It functions in two distinct modes:
- Ecosystem Mode (With NSR-AI): Turns your server data into an interactive, agentic database where players can chat with "StatsMaster"—an AI persona that understands natural language, scans player inventories, handles complex comparisons, and automatically formats output with custom Minecraft colors.
- Standalone Mode (Without AI): Operates as a lightweight, super-fast stat-tracking plugin. Typos are resolved instantly using an integrated Levenshtein-based Fuzzy Matching Engine, falling back to optimized text commands if the AI backend is offline.
? Dual-Operating Modes: With & Without AI
1. ? AI-Hooked Mode (Agentic Recursive Reasoning)
When integrated with NSR-AI (via a dynamic Java Reflection hook), APS introduces Recursive Intelligence:
- Dynamic Context Injection: When a player asks "How am I doing?", the plugin instantly injects their live vital stats (health, hunger, playtime, afk status) into the AI's short-term memory.
- Recursive Tag Resolution: Instead of sending massive database dumps to the AI (which wastes token bandwidth), the AI uses an internal tagging system (e.g.,
[TYPE:PlayerName,kills,deaths]). The plugin intercepts these tags mid-generation, resolves the request against local player data, and feeds the specific answer back to the AI.
- Inventory Grid Scanning: The AI can query live inventories using
[TYPE:PlayerName,inventory]. The plugin formats a 9x4 grid of the player's main inventory, off-hand, and armor slots, allowing StatsMaster to answer questions like "Do I have enough gold to craft a golden apple?".
- Comparison Engine: The AI can parse and query multiple players at once (e.g.,
[TYPE:Steve,stats][TYPE:Alex,stats]), dynamically retrieving and comparing data to crown the top sniper or mining champion.
- Sovereign API Keys: Prioritizes the player's individual API key for AI generation, falling back to the server's global key or standard fuzzy commands if keys are missing.
2. ⚡ Standalone Mode (High-Performance Fallback)
If NSR-AI is missing or fails to load, APS automatically shifts to a robust local fallback:
- Fuzzy Search Engine: Uses the Levenshtein Distance Algorithm to match user inputs. If a player types
/aps stats saksk hlth, the engine matches saksk to Saksh and hlth to health, returning the correct result.
- No API Keys Required: All commands run 100% locally with zero external network requests.
- Direct Command Line: Fully functional
/aps command routes statistics quickly to players through clean, responsive text formatting.
?️ Privacy Sovereignty & Technical Design
Granular Privacy Controls
APS was designed with Privacy-by-Design principles. Players retain absolute sovereignty over their metrics:
- Using
/aps privacy <feature> [on|off], players can toggle visibility on any stat category.
- If a player sets a stat (like
kills) to off, both command requests and AI queries will return [PRIVATE]. The StatsMaster AI is instructed to respect this tag and politely refuse to disclose that specific metric to other players.
- Administrators (or players with the
nsr-ai.admin.privacy.bypass permission) can bypass privacy filters for investigation.
Coordinate Protection
- Safe Location Tracking: The location statistic tracks the active dimension/world name (e.g.,
world_nether, world_the_end) but never stores or reveals coordinates (X, Y, Z). This prevents coordinate exploitation and tracking.
Minimal TPS Impact Architecture
- Asynchronous I/O: Stat increments are tracked on the main thread via Spigot listeners, but all database reads, writes, and AI requests run asynchronously on a background Bukkit runnable (
1200L / 60-second intervals) to ensure minimal main-thread performance cost.
- UUID-Indexed Storage: Player data is saved in structured, clean YAML files (
plugins/Advanced-Player-Stats/playerdata/{UUID}.yml), preventing index corruption.
⚔️ Complete Analytics Portfolio (29 Stats)
APS 3.0 tracks a massive array of metrics, categorized below:
? General & Vitals
- Playtime — Total active time spent playing on the server (updated asynchronously in background tasks).
- Times Joined — Tracks the number of unique login sessions.
- Health — Monitored current health status.
- Hunger — Real-time tracking of food level status.
- AFK Status — Detects if a player is currently away from keyboard.
- AFK Time — Accumulates total time spent in AFK mode.
- Location Context — Tracks the current dimension/world safely without leaking coordinates.
⚔️ Combat & Accuracy Profiling
- Player Kills — Total other players defeated in PvP.
- Total Deaths — Total times a player has died.
- Kill/Death Ratio (K/D) — Computes the PvP efficiency of a player.
- PVP Kill Streak — Tracks consecutive player kills without dying.
- Bow Accuracy — Percentage of arrows hit vs. arrows shot.
- Crossbow Accuracy — Percentage of crossbow bolts hit vs. crossbow bolts shot.
- Total Damage Dealt — Cumulative final damage dealt to all entities.
- Total Damage Taken — Cumulative final damage received.
- Highest Single Hit — Records the maximum final damage dealt in a single blow.
- Shield Blocks — Records the number of successful attacks deflected using a shield.
? Detailed Death Breakdown
- Deaths by Player — Deaths caused in PvP combat by other players.
- Deaths by Mob — Deaths caused by hostile mobs.
- Deaths by Environment — Deaths caused by natural hazards (lava, fall damage, drowning, void, suffix damage).
? Movement & Physical Activity
- Distance Traveled — Total distance traveled in meters/blocks.
- Jumps — Records the total count of jumps.
- Sneak Time — Total active time spent sneaking.
⛏️ Mining, Progression & Social
- Blocks Broken — Total blocks broken of any type.
- Blocks Placed — Total blocks placed of any type.
- Valuable Ore Tracking — Monitors any block ending in
_ORE and Ancient Debris.
- Items Crafted — Total items created through crafting menus.
- Items Enchanted — Total items enchanted (via Enchantment Tables or anvils).
- Mob Kills — Total passive and hostile mobs killed.
- Total Chats — Total count of chat messages sent.
- Average Chat length — Average number of characters per chat message.
- Live Inventory Scan — Invisible, AI-readable scanning of a player's armor and inventory grid (armor, off-hand, and main 9x4 grid).
⚙️ Commands & Permissions
Commands Index
/aps stats <player> [stat] — View a player's full statistics or query a specific one (e.g. /aps stats Saksh bow_accuracy).
/aps privacy <feature|all> [on|off] — Manually manage visibility settings for your stats.
/aps help — Displays the plugin help menu.
/aps migrate — (Admin Only) Runs the self-healing migration tool to move configuration and player files from v2.x to v3.0.
/aps <natural language question> — (AI Only) Talk directly to the StatsMaster AI (e.g. /aps compared to Steve, how many diamonds have I mined?).
Permissions Index
nsr-ai.advancedplayerstats.view — Allows viewing stats (Default: OP).
nsr-ai.advancedplayerstats.view.inventory — Allows viewing player inventory stats (Default: OP).
nsr-ai.advancedplayerstats.admin — Access to administrator settings and the migration engine.
nsr-ai.admin.privacy.bypass — Bypasses privacy restrictions on players' profiles.
? Self-Healing Upgrade & Migration
Upgrading from Advanced Player Stats 2.x is seamless.
- Place the new
Advanced-Player-Stats-3.0.jar in your plugins/ directory.
- Start the server.
- Log in as an operator (OP) and run
/aps migrate.
- The migration engine will find your old files under
plugins/NSR-AI/addons/NSR-AI-Advanced-Player-Stats, automatically transfer all player statistics and configurations to plugins/Advanced-Player-Stats/, and log the results.
Transforming raw data into intelligent, privacy-respecting gameplay insights.
Developed by BlackForge Studio
评论 0
登录后参与评分
还没有评论,来抢沙发吧