SepdShards
奖励那些挂机(AFK)的玩家,然后让他们在你自行设置的指令商店中花费赚取的货币。
SepdShards 添加了一种名为 shards 的小型货币。玩家在你使用 WorldGuard 创建的 AFK 区域中停留时即可获得 shards,随后可以在 GUI 商店中消费它们。每个商店物品只需执行你指定的任意指令,因此它可以用于发放排名、装备包、物品、传送、宝箱钥匙等任何内容。
功能介绍
AFK 奖励
- 创建一个普通的 WorldGuard 区域(例如
afk),并将其 ID 填入配置文件。
- 只要玩家进入该区域(无论是走进来的还是被传送进来的),即被视为处于 AFK 状态。
- 屏幕中央会显示标题 “YOU ARE NOW AFK”,下方附带奖励信息。
- 动作栏实时显示距离下次奖励的时间、本会话已获得的 shards 数量以及当前余额。
- 你可以设置奖励间隔时间(秒)以及每次奖励给予的 shards 数量。
- 可选配置:当获得奖励时播放声音、发送聊天消息,并在动作栏上快速闪烁 “+shards” 提示。
- 系统会按玩家记录累计总 AFK 收益。
指令商店
- 输入
/shardshop 打开商店。这是一个包含上一页/下一页按钮和实时余额显示的 54 格分页菜单。
- 所有商品条目位于
shop.yml 文件中。点击某个物品会扣除相应数量的 shards,然后执行你配置的指令。
- 指令可以从控制台运行、以玩家身份运行、向购买者发送消息或向全服广播。
- 将某项设置为
enabled: false 即可隐藏该物品,而无需删除它。
- 你可以为每个物品指定所在页码和格子位置。如果目标格子已被占用,物品会自动移至下一个可用空格子。
- 每个物品支持可选附加功能:权限要求、购买后关闭界面、更多背景文本行(lore),以及任意材质作为图标。
- 支持在指令执行失败时进行可选退款。
经济系统
- 查询余额、向其他玩家转账,或以管理员身份给予、扣除或设定 shards。
- 余额每 5 分钟自动保存一次,并在服务器关闭时保存。
排行榜
/shardstop 展示最富有的玩家列表。你可以自定义上榜人数。
PlaceholderAPI 支持
- 提供 17 个占位符,可用于计分板、标签页列表和全息显示(包括余额、排名、AFK 状态、距下次奖励时间、顶级玩家等信息)。
- 这些占位符返回的文本内容也是可配置的。
高度可配置
- 所有消息、标题、动作栏文字、音效和占位符文本均位于
config.yml 中。
- 运行
/shards reload 即可应用商店和配置更改,无需重启服务器。
前置要求
|
|
| 服务端 |
Paper 1.18+(及其衍生版本) |
| Java 版本 |
17 或更高 |
| 必需插件 |
WorldGuard |
| 可选插件 |
PlaceholderAPI |
安装设置
- 安装 WorldGuard,将
SepdShards.jar 放入 plugins 文件夹并启动服务器。
- 在游戏中创建 AFK 区域:
//wand
(选择两个对角点)
/rg define afk
- 打开
plugins/SepdShards/config.yml,确认 afk.regions 中包含 afk(默认已包含)。根据需要设置 interval-seconds 和 shards-per-interval。
- 编辑
plugins/SepdShards/shop.yml 以添加你自己的商品。
- 运行
/shards reload,站在区域内,即可开始赚取 shards。
命令列表
| 命令 |
功能 |
权限节点 |
/shards 或 /shards balance |
查看你的 shards 余额 |
shardsshop.use |
/shards balance <player> |
查看其他玩家的 shards 余额 |
shardsshop.balance.others |
/shards pay <player> <amount> |
向在线玩家转账 shards |
shardsshop.pay |
/shards give <player> <amount> |
给予玩家 shards |
shardsshop.admin |
/shards take <player> <amount> |
从玩家处扣除 shards |
shardsshop.admin |
/shards set <player> <amount> |
设定玩家的 shards 数量 |
shardsshop.admin |
/shards top 或 /shardstop |
查看排行榜 |
shardsshop.top |
/shardshop |
打开商店 |
shardsshop.use |
/shards reload |
重载配置和商店文件 |
shardsshop.admin |
别名:/shard, /sshop, /topshards
权限节点
| 权限节点 |
默认赋予对象 |
允许的操作 |
shardsshop.use |
所有人 |
查看自己的余额并打开商店 |
shardsshop.top |
所有人 |
查看排行榜 |
shardsshop.pay |
所有人 |
向其他玩家转账 |
shardsshop.balance.others |
管理员 (op) |
查看其他玩家的余额 |
shardsshop.admin |
管理员 (op) |
给予、扣除、设定余额及重载配置 |
商店示例
shop.yml 中的每个商品条目如下所示:
items:
diamonds:
enabled: true
name: "&bx16 Diamonds"
icon: DIAMOND
price: 10
page: 1
slot: 0
lore:
- "&7Get 16 diamonds"
commands:
- "[console] give %player% diamond 16"
- "[message] &aYou received 16 diamonds!"
指令前缀说明
| 前缀 |
功能 |
[console] cmd |
从控制台执行(如果不添加前缀,这是默认行为) |
[player] cmd |
以购买该物品的玩家身份执行 |
[message] text |
向购买者发送消息 |
[broadcast] text |
向全服广播消息 |
可在商店指令、名称和背景文本中使用的占位符: %player%, %uuid%, %price%, %item%
其他商品选项: permission, close-on-purchase, lore, icon, page, slot, enabled
AFK 配置示例
afk:
regions:
- afk
interval-seconds: 60
shards-per-interval: 1
enter-title: "&a&lYOU ARE NOW AFK"
enter-subtitle: "&7Rewards: &e%amount% shard(s) &7every &e%interval%"
actionbar: "&aAFK &8| &7Next reward in &e%time% &8| &7Earned: &e%earned%"
AFK 消息中可用的占位符:%time%, %earned%, %total%, %balance%, %amount%, %interval%
PlaceholderAPI 占位符
标识符为 shards。
| 占位符 |
返回值 |
%shards_balance% |
当前碎片数量 |
%shards_balance_formatted% |
带千位分隔符的当前碎片数量(例如 1,234) |
%shards_rank% |
排行榜排名 |
%shards_afk% |
true 或 false |
%shards_afk_status% |
AFK / Not AFK(文本可配置) |
%shards_afk_earned% |
本次挂机会话获得的碎片数 |
%shards_afk_total% |
累计挂机获得的碎片总数 |
%shards_afk_next% |
距离下次奖励的时间(例如 1m 5s) |
%shards_afk_next_seconds% |
距离下次奖励的秒数 |
%shards_afk_interval% |
奖励间隔时间 |
%shards_afk_amount% |
每个间隔给予的碎片数量 |
%shards_top_<n>_name% |
第 n 名玩家的名称 |
%shards_top_<n>_amount% |
该玩家的碎片数量 |
在余额、已赚取、总计和排行榜数量的占位符后添加 _formatted 后缀,即可获取带千位分隔符的版本。
常见问题
它能在 Spigot 上运行吗?
不能,它是基于 Paper API 构建的,因此仅适用于 Paper 及其分支服务器。
我可以使用多个挂机区域吗?
可以,只需在 afk.regions 下列出任意数量的区域 ID 即可。
玩家需要移动或输入任何内容才能被判定为挂机吗?
不需要。只要处于区域内即可,因此将玩家传送至该区域同样有效。
商店物品能执行来自其他插件的命令吗?
可以,支持任何命令。无论是通过 LuckPerms 设置权限、开启箱子钥匙、提供套装还是传送等,均可使用。
玩家数据保存在哪里?
保存在 plugins/SepdShards/data.yml 中。
更新后我的商店变空了。
旧版本使用了不同的 shop.yml 格式。请删除旧文件并重启服务器,系统将自动生成新的配置文件。
? 需要帮助?
Discord:
SepdShards
Reward players for standing around AFK, then let them spend what they earn in a command shop you set up yourself.
SepdShards adds a small currency called shards. Players earn shards by standing in AFK regions you make with WorldGuard, then spend them in a GUI shop. Every shop item just runs whatever commands you give it, so it can be a rank, a kit, items, a teleport, a crate key, anything.
What it does
AFK rewards
- Make a normal WorldGuard region (like
afk) and put its ID in the config.
- Players count as AFK the moment they're inside the region, whether they walked in or got teleported in.
- A "YOU ARE NOW AFK" title shows up with the reward info underneath.
- A live action bar shows time until the next reward, shards earned this session, and current balance.
- You set the interval (seconds between rewards) and how many shards each reward gives.
- There's an optional sound, chat message, and a quick "+shards" flash on the action bar when a reward is paid.
- All-time AFK earnings are tracked per player.
Command shop
- Open it with
/shardshop. It's a paginated 54-slot menu with previous/next buttons and a live balance display.
- Every item lives in
shop.yml. Clicking one takes the price in shards and then runs your commands.
- Commands can run from the console, run as the player, send the buyer a message, or broadcast to everyone.
- Set
enabled: false to hide an item without deleting it.
- You pick the page and slot for each item. If a slot is already taken, the item moves to the next free one.
- Optional extras per item: a permission, close-on-purchase, more lore lines, and any material as the icon.
- Optional refund if a command fails to run.
Economy
- Check balances, pay other players, and give, take, or set shards as an admin.
- Balances save automatically every 5 minutes and when the server stops.
Leaderboard
/shardstop shows the richest players. You choose how many get listed.
PlaceholderAPI
- 17 placeholders for scoreboards, tab lists, and holograms (balance, rank, AFK status, time to next reward, top players and more).
- The text those placeholders return is configurable too.
Configurable
- Every message, title, action bar, sound, and placeholder text is in
config.yml.
/shards reload applies shop and config changes, no restart needed.
Requirements
|
|
| Server |
Paper 1.18+ (and Paper forks) |
| Java |
17 or newer |
| Required plugin |
WorldGuard |
| Optional plugin |
PlaceholderAPI |
Setup
- Install WorldGuard, drop
SepdShards.jar into your plugins folder, and start the server.
- Make an AFK region in game:
//wand
(select two corners)
/rg define afk
- Open
plugins/SepdShards/config.yml and check that afk.regions contains afk (it does by default). Set interval-seconds and shards-per-interval however you like.
- Edit
plugins/SepdShards/shop.yml to add your own items.
- Run
/shards reload, stand in the region, and you'll start earning shards.
Commands
| Command |
What it does |
Permission |
/shards or /shards balance |
Show your shards |
shardsshop.use |
/shards balance <player> |
Show another player's shards |
shardsshop.balance.others |
/shards pay <player> <amount> |
Send shards to an online player |
shardsshop.pay |
/shards give <player> <amount> |
Give shards to a player |
shardsshop.admin |
/shards take <player> <amount> |
Take shards from a player |
shardsshop.admin |
/shards set <player> <amount> |
Set a player's shards |
shardsshop.admin |
/shards top or /shardstop |
Show the leaderboard |
shardsshop.top |
/shardshop |
Open the shop |
shardsshop.use |
/shards reload |
Reload config and shop |
shardsshop.admin |
Aliases: /shard, /sshop, /topshards
Permissions
| Permission |
Default |
What it allows |
shardsshop.use |
everyone |
Check your own balance and open the shop |
shardsshop.top |
everyone |
View the leaderboard |
shardsshop.pay |
everyone |
Pay other players |
shardsshop.balance.others |
op |
Check other players' balance |
shardsshop.admin |
op |
Give, take, set, and reload |
Shop example
Each item in shop.yml looks like this:
items:
diamonds:
enabled: true
name: "&bx16 Diamonds"
icon: DIAMOND
price: 10
page: 1
slot: 0
lore:
- "&7Get 16 diamonds"
commands:
- "[console] give %player% diamond 16"
- "[message] &aYou received 16 diamonds!"
Command prefixes
| Prefix |
What it does |
[console] cmd |
Runs from the console (this is the default if you don't add a prefix) |
[player] cmd |
Runs as the player who bought it |
[message] text |
Sends a message to the buyer |
[broadcast] text |
Sends a message to everyone |
Placeholders you can use in shop commands, names, and lore: %player%, %uuid%, %price%, %item%
Other item options: permission, close-on-purchase, lore, icon, page, slot, enabled
AFK config example
afk:
regions:
- afk
interval-seconds: 60
shards-per-interval: 1
enter-title: "&a&lYOU ARE NOW AFK"
enter-subtitle: "&7Rewards: &e%amount% shard(s) &7every &e%interval%"
actionbar: "&aAFK &8| &7Next reward in &e%time% &8| &7Earned: &e%earned%"
Placeholders for the AFK messages: %time%, %earned%, %total%, %balance%, %amount%, %interval%
PlaceholderAPI placeholders
The identifier is shards.
| Placeholder |
What it returns |
%shards_balance% |
Current shards |
%shards_balance_formatted% |
Current shards with commas (1,234) |
%shards_rank% |
Leaderboard position |
%shards_afk% |
true or false |
%shards_afk_status% |
AFK / Not AFK (text is configurable) |
%shards_afk_earned% |
Shards earned this AFK session |
%shards_afk_total% |
All-time shards earned from AFK |
%shards_afk_next% |
Time until next reward (e.g. 1m 5s) |
%shards_afk_next_seconds% |
Seconds until next reward |
%shards_afk_interval% |
Reward interval |
%shards_afk_amount% |
Shards given per interval |
%shards_top_<n>_name% |
Name of the player in position n |
%shards_top_<n>_amount% |
Their shards |
Add _formatted to get the comma version for balance, earned, total, and top amounts.
FAQ
Does it work on Spigot?
No, it's built on the Paper API, so it's for Paper and its forks.
Can I use more than one AFK region?
Yes, just list as many region IDs as you want under afk.regions.
Do players need to move or type anything to count as AFK?
Nope. Being inside the region is all that matters, so teleporting players in works fine.
Can shop items run commands from other plugins?
Yep, any command works. Ranks through LuckPerms, crate keys, kits, teleports, whatever you use.
Where is player data saved?
In plugins/SepdShards/data.yml.
I updated and my shop is empty.
Older versions used a different shop.yml format. Delete the old file and restart, and a new one will be generated.
? Need Help?
Discord:
评论 0
登录后参与评分
还没有评论,来抢沙发吧