一款强大且轻量的 Paper 插件,用于追踪每位玩家的累计经验值,并在达到经验里程碑时执行自定义奖励。
完全可配置、支持多语言,专为现代 Paper 服务器(1.21+)构建。
✨ 功能特性
- 全局总经验值追踪 ?
- 追踪来自击杀生物、挖掘以及原版命令(
/xp、/experience)的经验值。
- 即使死亡也不会重置。
- 异步缓存:高性能数据处理,防止服务器卡顿。
- BossBar 进度系统 ?
- 显示自定义 BossBar,展示通往下一个排名的进度。
- 动态模式:在未获得经验时自动隐藏进度条。
- 富文本支持:同时支持 MiniMessage(渐变、RGB)和旧版颜色代码(
&a)!
- 奖励系统 ?
- 达到阈值时执行多条命令。
- 发送自定义广播消息。
- 在命令中支持 Minecraft 目标选择器(例如
@a、@p)。
- 全面自定义 ?️
- 支持 PlaceholderAPI。
- 通过
lang.yml 完全控制语言内容(包括“最高排名”文本)。
- 使用 SQLite 存储,并支持自动架构迁移(外部应用可以读取
current_rank)。
? 安装
- 从 Releases 页面下载最新版本。
- 将
.jar 文件放入服务器的 plugins 文件夹中。
- 启动服务器以生成配置文件。
- 根据需要调整
config.yml 和 lang.yml。
- 重启服务器或运行:
/txp reload
⚙️ 配置
config.yml(示例)
bossbar:
enabled: true
# 混合支持:混合使用旧版 (&) 和 MiniMessage (<gradient>)!
title: "&b当前排名: &e%current_rank% &7| <gradient:blue:aqua>下一名: %next_rank%</gradient> &7(&a%xp%&7/&c%required_xp%&7)"
color: BLUE
style: SOLID
dynamic-mode: true # 获得经验时显示进度条,超时后隐藏
timeout: 10
rewards:
"1000":
name: "<gradient:#2486B5:#3A816A>新手</gradient>"
commands:
- "give %player% diamond 1"
- "eco give %player% 250"
broadcast: "&a%player% 达到了 %threshold% XP (新手)!"
"50000":
name: "大师"
commands:
- "give %player% netherite_ingot 1"
broadcast: "&6%player% 现在是大师了!"
? 占位符
可在 聊天、广播 和 BossBar 中使用:
| 占位符 |
描述 |
%player% |
玩家名称 |
%xp% |
玩家累计总经验值 |
%current_rank% |
当前排名名称(例如 "Novice") |
%next_rank% |
下一个排名名称(例如 "Master") |
%required_xp% |
下一级排名所需的经验值 |
%threshold% |
达到的具体阈值(仅限奖励部分) |
? 命令
| 命令 |
描述 |
权限 |
/txp get <player> |
查看玩家的总经验值 |
totalxp.view |
/txp show |
显示你的 BossBar |
totalxp.use |
/txp hide |
隐藏你的 BossBar |
totalxp.use |
/txp set <player> <amount> |
设置玩家的经验值 |
totalxp.admin |
/txp reset <player> |
重置玩家经验及历史记录 |
totalxp.admin |
/txp reload |
重载配置及语言文件 |
totalxp.admin |
? 存储
经验值和奖励历史记录通过 SQLite 存储,位于:
plugins/TotalXPRewards/database.db
外部访问:
数据库现在包含 current_rank 和 username 列,便于与网页排行榜集成(例如 Node.js 应用)。
? 插件支持
- LuckPerms(用于排名奖励)
- Vault(用于经济系统)
- PlaceholderAPI(用于额外占位符)
该插件不依赖这些插件,但如果已安装则会自动集成。
?️ 免责声明
本插件的开发得到了 Google DeepMind 的 AI 协助。
所有代码和设计决策均已经过人工审查并最终确定。
? 许可证
本项目采用 MIT License 许可。
您可以自由使用、修改和贡献。
? 贡献
欢迎提交拉取请求和功能建议!
如果遇到错误或有任何想法,请随时提交 Issue。
⭐ 支持该项目
如果你喜欢这款插件,请在 GitHub 上点个 Star —— 这对我们帮助很大!
A powerful and lightweight Paper plugin that tracks each player's lifetime XP and executes custom rewards when XP milestones are reached.
Fully configurable, translation-ready, and built for modern Paper servers (1.21+).
✨ Features
- Global Total XP Tracking ?
- Tracks XP from killing mobs, mining, and vanilla commands (
/xp, /experience).
- Never resets, even after death.
- Async Caching: High-performance data handling prevents server lag.
- BossBar Progress System ?
- Displays a customizable BossBar showing progress to the next rank.
- Dynamic Mode: Auto-hides the bar when not gaining XP.
- Rich Text support: Supports MiniMessage (Gradients, RGB) AND Legacy Color Codes (
&a) simultaneously!
- Reward System ?
- Execute multiple commands when reaching a threshold.
- Send custom broadcast messages.
- Supports Minecraft Target Selectors in commands (e.g.,
@a, @p).
- Full Customization ?️
- PlaceholderAPI support.
- Complete language control via
lang.yml (including "Max Rank" text).
- SQLite storage with automatic schema migration (external apps can read
current_rank).
? Installation
- Download the latest release from the Releases page.
- Drop the
.jar file into your server's plugins folder.
- Start the server to generate config files.
- Adjust
config.yml and lang.yml to your liking.
- Restart or run:
/txp reload
⚙️ Configuration
config.yml (example)
bossbar:
enabled: true
# Hybrid Support: Mix Legacy (&) and MiniMessage (<gradient>)!
title: "&bCurrent Rank: &e%current_rank% &7| <gradient:blue:aqua>Next: %next_rank%</gradient> &7(&a%xp%&7/&c%required_xp%&7)"
color: BLUE
style: SOLID
dynamic-mode: true # Bar appears on XP gain and hides after timeout
timeout: 10
rewards:
"1000":
name: "<gradient:#2486B5:#3A816A>Novice</gradient>"
commands:
- "give %player% diamond 1"
- "eco give %player% 250"
broadcast: "&a%player% reached %threshold% XP (Novice)!"
"50000":
name: "Master"
commands:
- "give %player% netherite_ingot 1"
broadcast: "&6%player% is now a Master!"
? Placeholders
Available for use in Chat, Broadcasts, and BossBar:
| Placeholder |
Description |
%player% |
Player's name |
%xp% |
Player's total lifetime XP |
%current_rank% |
Name of the current rank (e.g. "Novice") |
%next_rank% |
Name of the next rank (e.g. "Master") |
%required_xp% |
XP required for the next rank |
%threshold% |
The specific threshold reached (Rewards only) |
? Commands
| Command |
Description |
Permission |
/txp get <player> |
View a player’s total XP |
totalxp.view |
/txp show |
Show your BossBar |
totalxp.use |
/txp hide |
Hide your BossBar |
totalxp.use |
/txp set <player> <amount> |
Set a player’s XP |
totalxp.admin |
/txp reset <player> |
Reset player XP & history |
totalxp.admin |
/txp reload |
Reload config & language |
totalxp.admin |
? Storage
XP and reward history are stored via SQLite, located in:
plugins/TotalXPRewards/database.db
External Access:
The database now includes a current_rank and username column, making it easy to integrate with web leaderboards (e.g. Node.js apps).
? Plugin Support
- LuckPerms (for rank rewards)
- Vault (for economy)
- PlaceholderAPI (for extra placeholders)
The plugin does not depend on them but integrates automatically if installed.
?️ Disclaimer
This plugin was developed with the assistance of Google DeepMind's AI.
All code and design decisions were reviewed and finalized manually.
? License
This project is licensed under the MIT License.
You are free to use, modify, and contribute.
? Contributing
Pull requests and feature suggestions are welcome!
Feel free to open an issue if you encounter bugs or have ideas.
⭐ Support the Project
If you enjoy this plugin, consider leaving a star on GitHub — it helps a lot!
评论 0
登录后参与评分
还没有评论,来抢沙发吧