PlaceholderTebex
将实时 Tebex 商店数据作为 PlaceholderAPI 变量
❱ 什么是 PlaceholderTebex?
PlaceholderTebex 将你的 Tebex 商店 直接连接到 PlaceholderAPI,以即插即用的占位符形式暴露实时的捐赠数据。
它们可用于全息图、计分板、聊天、菜单、告示牌——任何支持 PlaceholderAPI 的地方。数据通过异步方式获取并缓存在内存中,因此每个占位符都能瞬间解析,且无需每次请求都调用 API。
❱ 功能特性
- 历史总榜前 10 名捐赠者 — 姓名、总金额、货币、日期和套餐
- 月度捐赠榜前 10 名 — 按当前月份筛选的相同数据
- 最近一位捐赠者 — 姓名、金额、日期、时间、套餐和交易 ID
- 捐赠目标系统 — 进度条、百分比、剩余金额、达成标志
- 通用统计 — 总捐赠额、交易次数和唯一捐赠者数量(历史总计、月度、每日)
- 商店信息 — 商店名称、货币和域名
- 智能异步缓存 — 可配置的刷新间隔,占位符请求无延迟
- 完全可配置 — 数字格式、日期格式、备用文本、目标金额
- 兼容 Paper 和 Spigot 1.20.x — 1.21.x
❱ 依赖要求
| 依赖项 |
版本 |
必需 |
| Paper / Spigot |
1.20.x — 1.21.x |
✔ |
| PlaceholderAPI |
2.11.x 或更高 |
✔ |
| Tebex Plugin |
最新版 |
✔ |
| Java |
17 或更高 |
✔ |
⚠️ PlaceholderTebex 使用与 Tebex 插件 相同的密钥。请确保已安装并配置好 Tebex 插件,然后将其密钥复制到 PlaceholderTebex/config.yml 中。
❱ 安装步骤
- 确保 Tebex 插件 已安装在服务器上并正常运行。
- 将
PlaceholderTebex.jar 放入 /plugins 文件夹。
- 启动服务器一次以生成
config.yml。
- 打开
plugins/Tebex/config.yml 并复制 secret 的值。
- 将其粘贴到
plugins/PlaceholderTebex/config.yml 中的 secret-key 下。
- 运行
/ptebex reload 即可完成设置。
⚠️ 切勿公开分享你的密钥。它允许完全访问你的 Tebex 商店。
❱ 占位符
最近一位捐赠者
| 占位符 |
描述 |
%tebex_last_donor_name% |
最近一位捐赠者的用户名 |
%tebex_last_donor_amount% |
他们支付的金额 |
%tebex_last_donor_currency% |
使用的货币 |
%tebex_last_donor_date% |
捐赠日期 |
%tebex_last_donor_datetime% |
捐赠日期和时间 |
%tebex_last_donor_package% |
购买的套餐 |
%tebex_last_donor_transaction% |
交易 ID |
历史总榜捐赠者 (将 N 替换为 1–10)
| 占位符 |
描述 |
%tebex_top_name_N% |
第 N 名捐赠者的用户名 |
%tebex_top_amount_N% |
第 N 名捐赠者的累计捐赠总额 |
%tebex_top_currency_N% |
货币 |
%tebex_top_date_N% |
最近一次付款日期 |
%tebex_top_package_N% |
购买的套餐 |
月度捐赠榜 (将 N 替换为 1–10)
| 占位符 |
描述 |
%tebex_monthly_top_name_N% |
月度榜单第 N 名的用户名 |
%tebex_monthly_top_amount_N% |
本月捐赠金额 |
%tebex_monthly_top_currency_N% |
货币 |
%tebex_monthly_top_date_N% |
捐赠日期 |
%tebex_monthly_top_package_N% |
购买的套餐 |
%tebex_monthly_total% |
本月捐赠总额 |
%tebex_monthly_transactions% |
本月交易次数 |
通用统计
| 占位符 |
描述 |
%tebex_total_donated% |
历史累计捐赠总额 |
%tebex_total_donated_month% |
本月捐赠总额 |
%tebex_total_donated_today% |
今日捐赠总额 |
%tebex_total_transactions% |
历史累计交易次数 |
%tebex_total_transactions_month% |
本月交易次数 |
%tebex_total_transactions_today% |
今日交易次数 |
%tebex_unique_donors% |
唯一捐赠者数量 |
捐赠目标
| 占位符 |
描述 |
%tebex_goal_target% |
配置文件中设定的目标金额 |
%tebex_goal_current% |
本月已筹集的金额 |
%tebex_goal_remaining% |
距离达成目标剩余的金额 |
%tebex_goal_progress% |
带符号的百分比 — 例如 73.50% |
%tebex_goal_progress_raw% |
原始数值 — 例如 73.50 |
%tebex_goal_bar% |
视觉进度条,20 个字符长 |
%tebex_goal_bar_10% |
视觉进度条,10 个字符长 |
%tebex_goal_reached% |
true 或 false |
商店信息
| 占位符 |
描述 |
%tebex_store_name% |
商店名称 |
%tebex_store_currency% |
商店默认货币 |
%tebex_store_domain% |
商店域名 |
❱ 使用示例
捐赠者排行榜全息图
&6&l TOP DONORS
&e#1 &f%tebex_top_name_1% &7— &a$%tebex_top_amount_1%
&e#2 &f%tebex_top_name_2% &7— &a$%tebex_top_amount_2%
&e#3 &f%tebex_top_name_3% &7— &a$%tebex_top_amount_3%
月度目标计分板行
Goal: %tebex_goal_bar_10% %tebex_goal_progress%
最近一位捐赠者告示牌或聊天消息
%tebex_last_donor_name% — $%tebex_last_donor_amount%
%tebex_last_donor_datetime%
❱ 命令
| 命令 |
描述 |
权限 |
/ptebex reload |
重载配置并重启缓存任务 |
placeholdertebex.admin |
/ptebex refresh |
强制从 Tebex 获取最新数据 |
placeholdertebex.admin |
/ptebex clearcache |
清除所有缓存数据 |
placeholdertebex.admin |
/ptebex info |
显示插件状态和实时统计 |
placeholdertebex.admin |
❱ 配置文件
tebex:
secret-key: "YOUR_PRIVATE_KEY_HERE"
base-url: "https://plugin.tebex.io"
cache:
refresh-interval: 10 # 两次 Tebex API 拉取之间的间隔(分钟)
payment-history-limit: 100 # 加载的历史支付记录数量
goal:
enabled: true
target-amount: 500.0 # 月度捐赠目标金额
占位符:
无数据:“N/A”
加载中:“Loading...”
货币格式:“%.2f”
日期格式:“dd/MM/yyyy”
日期时间格式:“dd/MM/yyyy HH:mm”
❱ 即将推出
- 游戏内查看排名靠前捐赠者的 GUI 命令
- 按玩家划分的占位符 — 检查特定玩家是否曾进行过捐赠
- Webhook 支持 — 当有新捐赠时通知 Discord
- 多商店支持 — 连接多个 Tebex 商店
- 顶级捐赠者奖励 — 当玩家登上榜首时执行命令
- 根据包名称自定义排行榜分类
❱ 更新日志
v1.0.1 — 最新版本
- 修复了玩家名字段 — 现在能从 Tebex API 响应中正确读取
player.name
- 修复了 JSON 解析 — 现在能处理数组和包裹在
data 中的响应格式
- 修复了日期解析 — 现在支持多种 Tebex 日期格式
- 改进了错误日志记录,便于调试
- 移除了控制台中冗长的调试日志
v1.0.0
❱ 支持
发现 Bug 或需要帮助?请在 GitHub 上提交 Issue 或在 Discord 上联系我。
❱ 许可证
© 2026 YesithX — 保留所有权利。
本插件免费提供用于个人及服务器用途。未经作者明确书面许可,您不得复制、修改、反编译、转售或重新分发本插件或其源代码的任何部分。
PlaceholderTebex
Real-time Tebex store data as PlaceholderAPI variables
❱ What is PlaceholderTebex?
PlaceholderTebex connects your Tebex store directly to PlaceholderAPI, exposing live donation data as ready-to-use placeholders.
Use them in holograms, scoreboards, chat, menus, signs — anywhere PlaceholderAPI is supported. Data is fetched asynchronously and cached in memory, so every placeholder resolves instantly with zero per-request API calls.
❱ Features
- Top 10 all-time donors — name, total amount, currency, date and package
- Top 10 monthly donors — same data filtered to the current month
- Last donor — name, amount, date, time, package and transaction ID
- Donation goal system — progress bar, percentage, remaining amount, reached flag
- General stats — total donated, transactions and unique donors (all-time, monthly, daily)
- Store info — store name, currency and domain
- Smart async cache — configurable refresh interval, no lag on placeholder requests
- Fully configurable — number formats, date formats, fallback text, goal target
- Compatible with Paper and Spigot 1.20.x — 1.21.x
❱ Requirements
| Dependency |
Version |
Required |
| Paper / Spigot |
1.20.x — 1.21.x |
✔ |
| PlaceholderAPI |
2.11.x or higher |
✔ |
| Tebex Plugin |
Latest |
✔ |
| Java |
17 or higher |
✔ |
⚠️ PlaceholderTebex uses the same secret key as the Tebex plugin. Make sure the Tebex plugin is installed and configured first, then copy its secret key into PlaceholderTebex/config.yml.
❱ Installation
- Make sure the Tebex plugin is already installed and working on your server.
- Place
PlaceholderTebex.jar into your /plugins folder.
- Start the server once to generate
config.yml.
- Open
plugins/Tebex/config.yml and copy the value of secret.
- Paste it into
plugins/PlaceholderTebex/config.yml under secret-key.
- Run
/ptebex reload and you're done.
⚠️ Never share your secret key publicly. It grants full access to your Tebex store.
❱ Placeholders
Last Donor
| Placeholder |
Description |
%tebex_last_donor_name% |
Username of the last donor |
%tebex_last_donor_amount% |
Amount they paid |
%tebex_last_donor_currency% |
Currency used |
%tebex_last_donor_date% |
Date of the donation |
%tebex_last_donor_datetime% |
Date and time of the donation |
%tebex_last_donor_package% |
Package they purchased |
%tebex_last_donor_transaction% |
Transaction ID |
All-Time Top Donors (replace N with 1–10)
| Placeholder |
Description |
%tebex_top_name_N% |
Username of top donor #N |
%tebex_top_amount_N% |
Total amount donated by #N |
%tebex_top_currency_N% |
Currency |
%tebex_top_date_N% |
Date of last payment |
%tebex_top_package_N% |
Package purchased |
Monthly Top Donors (replace N with 1–10)
| Placeholder |
Description |
%tebex_monthly_top_name_N% |
Username of monthly top #N |
%tebex_monthly_top_amount_N% |
Amount donated this month |
%tebex_monthly_top_currency_N% |
Currency |
%tebex_monthly_top_date_N% |
Date of donation |
%tebex_monthly_top_package_N% |
Package purchased |
%tebex_monthly_total% |
Total donated this month |
%tebex_monthly_transactions% |
Transaction count this month |
General Statistics
| Placeholder |
Description |
%tebex_total_donated% |
All-time total donated |
%tebex_total_donated_month% |
Total donated this month |
%tebex_total_donated_today% |
Total donated today |
%tebex_total_transactions% |
All-time transaction count |
%tebex_total_transactions_month% |
Transactions this month |
%tebex_total_transactions_today% |
Transactions today |
%tebex_unique_donors% |
Number of unique donors |
Donation Goal
| Placeholder |
Description |
%tebex_goal_target% |
Target amount set in config |
%tebex_goal_current% |
Amount raised this month |
%tebex_goal_remaining% |
Amount left to reach the goal |
%tebex_goal_progress% |
Percentage with symbol — e.g. 73.50% |
%tebex_goal_progress_raw% |
Raw number — e.g. 73.50 |
%tebex_goal_bar% |
Visual progress bar, 20 characters |
%tebex_goal_bar_10% |
Visual progress bar, 10 characters |
%tebex_goal_reached% |
true or false |
Store Info
| Placeholder |
Description |
%tebex_store_name% |
Store name |
%tebex_store_currency% |
Default store currency |
%tebex_store_domain% |
Store domain |
❱ Usage Examples
Top donors hologram
&6&l TOP DONORS
&e#1 &f%tebex_top_name_1% &7— &a$%tebex_top_amount_1%
&e#2 &f%tebex_top_name_2% &7— &a$%tebex_top_amount_2%
&e#3 &f%tebex_top_name_3% &7— &a$%tebex_top_amount_3%
Monthly goal scoreboard line
Goal: %tebex_goal_bar_10% %tebex_goal_progress%
Last donor sign or chat
%tebex_last_donor_name% — $%tebex_last_donor_amount%
%tebex_last_donor_datetime%
❱ Commands
| Command |
Description |
Permission |
/ptebex reload |
Reload config and restart cache task |
placeholdertebex.admin |
/ptebex refresh |
Force fetch fresh data from Tebex |
placeholdertebex.admin |
/ptebex clearcache |
Wipe all cached data |
placeholdertebex.admin |
/ptebex info |
Show plugin status and live stats |
placeholdertebex.admin |
❱ Configuration
tebex:
secret-key: "YOUR_PRIVATE_KEY_HERE"
base-url: "https://plugin.tebex.io"
cache:
refresh-interval: 10 # Minutes between Tebex API fetches
payment-history-limit: 100 # Number of past payments to load
goal:
enabled: true
target-amount: 500.0 # Monthly donation target
placeholders:
no-data: "N/A"
loading: "Loading..."
currency-format: "%.2f"
date-format: "dd/MM/yyyy"
datetime-format: "dd/MM/yyyy HH:mm"
❱ Coming Soon
- GUI command to view top donors in-game
- Per-player placeholder — check if a specific player has ever donated
- Webhook support — notify Discord when a new donation arrives
- Multi-store support — connect more than one Tebex store
- Top donor rewards — run commands when a player reaches the top
- Custom leaderboard categories by package name
❱ Changelog
v1.0.1 — Latest
- Fixed player name field — now correctly reads
player.name from Tebex API response
- Fixed JSON parsing — now handles both array and wrapped
data response formats
- Fixed date parsing — now supports multiple Tebex date formats
- Improved error logging for easier debugging
- Removed verbose debug logs from console
v1.0.0
❱ Support
Found a bug or need help? Open an issue on GitHub or contact me on Discord.
❱ License
© 2026 YesithX — All Rights Reserved.
This plugin is provided free of charge for personal and server use. You may not copy, modify, decompile, resell, or redistribute this plugin or any part of its source code without explicit written permission from the author.
评论 0
登录后参与评分
还没有评论,来抢沙发吧