✦ ShardCore ✦
适用于 SMP 服务器的完整 Shards 经济系统
独立货币。无需 Vault。无需 EssentialsX。完全掌控。
---
✨ 什么是 ShardCore?
ShardCore 为你的服务器添加了独立的 Shards 货币,以及玩家赚取和花费它所需的一切功能:挂机区、GUI 商店、任务、排行榜、全息图等等。每条消息、价格、奖励和菜单都可以通过简单的 .yml 文件进行配置,而游戏内的管理面板让你无需触碰文件即可编辑大部分数值。
🚀 特性
|
特性 |
详情 |
| 💰 |
Shards 经济 |
余额、支付、赠送、扣除、设置、重置、排行榜、完整交易记录。已屏蔽负数余额。 |
| ⏳ |
挂机区 (AFK Zones) |
使用魔杖选择区域。支持每区域奖励、间隔、每日上限和权限。BossBar 倒计时和 ActionBar 奖励提示。 |
| 🛒 |
GUI 商店 |
分类、预览、购买确认、折扣、每日购买限制和权限锁定物品。 |
| 📜 |
任务 |
每日和每周任务,带有进度显示和领取按钮。每个任务在每个周期内仅可领取一次。 |
| 🎁 |
奖励来源 |
每日奖励、首次加入奖励、击杀怪物、成就和管理员礼物。 |
| ⚡ |
倍率加成 |
基于权限的倍率(VIP、MVP...)和限时服务器活动。 |
| 🏆 |
全息图 |
自动刷新的 Top Shards 排行榜。 |
| 🛠 |
管理面板 |
通过 GUI 管理余额、区域、商店、任务、奖励、日志和统计数据。 |
| 🗄 |
存储 |
默认使用 SQLite,支持 MySQL,自动备份 SQLite 数据。 |
| 🔌 |
集成 |
PlaceholderAPI、LuckPerms 和 TAB(均为可选)。 |
| 🌍 |
语言 |
阿拉伯语和英语。 |
| 👨💻 |
开发者 API |
允许你的插件使用 Shards。 |
🛡 安全性
- 余额会缓存并异步保存(每 2 分钟、玩家退出时和服务端关闭时)。
- 商店购买时会先检查背包空间,如果交付失败则自动退款。
- 购买和任务领取具备点击防抖保护。
- 反作弊:玩家放置的方块和刷怪笼生成的怪物不计入任务或怪物奖励。
- 即使没有安装 PlaceholderAPI、LuckPerms 或 TAB 也能正常运行。
📋 需求
- 服务端: Spigot、Paper 或 Purpur
- Minecraft: 1.20.x - 1.21.x - 26.x
- Java: 17、21 和 25
- 可选依赖: PlaceholderAPI、LuckPerms、TAB
💬 指令
👤 玩家指令 (/shards, /shard, /sc)
| 指令 |
描述 |
/shards |
打开主菜单 |
/shards balance |
查看你的余额 |
/shards pay <player> <amount> |
发送 Shards |
/shards top |
排行榜 |
/shards history |
查看最近的交易记录 |
/shards shop |
打开商店 |
/shards quests |
打开任务界面 |
/shards daily |
领取每日奖励 |
/shards help |
帮助信息 |
🛠 管理员指令 (/shards 和 /shardadmin,别名 /sa)
| 指令 |
描述 |
/shards give/take/set <player> <amount> |
修改余额(玩家必须在线) |
/shards reset <player> |
重置余额 |
/shards info <player> |
玩家摘要信息 |
/shards reload |
重载配置文件 |
/shardadmin 或 /shardadmin gui |
打开管理面板 |
/shardadmin wand |
获取区域选择魔杖 |
/shardadmin zone create/delete/list/info <name> |
管理区域 |
/shardadmin zone setreward/setinterval/setlimit <name> <value> |
设置区域参数 |
/shardadmin zone setperm <name> <permission/none> |
限制区域访问权限 |
/shardadmin shop add <id> <category> <price> |
将手中物品添加到商店 |
/shardadmin shop remove <id> / shop reload |
管理商品 |
/shardadmin logs <player> / stats |
查看日志和统计数据 |
/shardadmin event start <name> <multiplier> <minutes> |
开始增益活动 |
/shardadmin event stop / event gift <amount> |
停止活动 / 向所有在线玩家赠送 |
/shardadmin holo create/delete <name> / list / reload |
管理排行榜全息图 |
/shardadmin backup |
创建 SQLite 备份 |
/shardadmin db info / db migrate |
数据库工具 |
🔑 权限
| 权限节点 |
默认值 |
描述 |
shardcore.use |
everyone |
主菜单和历史记录 |
shardcore.balance |
everyone |
查看余额 |
shardcore.pay |
everyone |
发送 Shards |
shardcore.shop |
everyone |
使用商店 |
shardcore.quests |
everyone |
任务和每日奖励 |
shardcore.admin |
op |
所有管理功能 |
shardcore.admin.give / .take |
op |
赠送 / 扣除 Shards |
shardcore.admin.zones |
op |
管理挂机区 |
shardcore.admin.shop |
op |
管理商店 |
shardcore.admin.logs |
op |
查看日志 |
shardcore.multiplier.<name> |
none |
在 multipliers.yml 中定义的倍率 |
LuckPerms 示例:/lp group vip permission set shardcore.multiplier.vip true
📂 配置文件
所有文件位于 plugins/ShardCore/ 目录下。编辑后运行 /shards reload 生效。
| 文件 |
用途 |
config.yml |
语言(ar / en)、反作弊、支持链接 |
messages.yml |
所有阿拉伯语和英语消息 |
afk-zones.yml |
AFK 区域(通过命令管理) |
shop.yml |
分类和产品 |
quests.yml |
每日奖励、生物奖励、任务 |
rewards.yml |
首次加入奖励和成就奖励 |
multipliers.yml |
权限倍率 |
holograms.yml |
排行榜全息图设置 |
database.yml |
SQLite / MySQL 及备份 |
⚙ config.yml
language: en # ar / en
anti-exploit:
placed-blocks: true
spawner-mobs: true
🛒 shop.yml
categories:
blocks: {name: "&aBlocks", icon: GRASS_BLOCK, slot: 10}
tools: {name: "&6Tools", icon: DIAMOND_PICKAXE, slot: 12}
items:
diamond:
category: ores
material: DIAMOND
amount: 1
price: 100
discount: 0 # 百分比
steak:
category: food
material: COOKED_BEEF
amount: 16
price: 30
max-per-day: 5 # 每日购买限制
permission: "" # 可选
📜 quests.yml
daily-reward:
amount: 50
cooldown-hours: 24
mob-reward:
enabled: true
chance: 100
default: 1
mobs: {ZOMBIE: 2, SKELETON: 2, CREEPER: 3, ENDERMAN: 5}
quests:
kill_zombies:
type: daily
name: "&aKill 20 Zombies"
event: KILL
target: ZOMBIE
amount: 20
reward: 40
🎁 rewards.yml
first-join:
enabled: true
amount: 100
achievements:
enabled: true
default: 5
ignore-prefixes: ["recipes/"]
overrides:
"story/mine_diamond": 50
"end/kill_dragon": 500
⚡ multipliers.yml
apply-to: [afk, mob, quest, daily, achievement, event]
multipliers:
vip: 1.5
mvp: 2.0
legend: 3.0
🏆 holograms.yml
refresh-seconds: 60
top-lines: 10
title: "&b&lTop Shards"
line-format: "&e#%pos% &f%player% &7- &e%amount%"
🗄 database.yml
type: sqlite # sqlite or mysql
mysql:
host: localhost
port: 3306
database: shardcore
user: root
password: ""
backup:
auto-enabled: true
every-hours: 6
keep: 10
🔧 快速设置
AFK 区域
/shardadmin wand,然后左键点击一个角,右键点击对角
/shardadmin zone create spawn
/shardadmin zone setreward spawn 10
/shardadmin zone setinterval spawn 60
/shardadmin zone setlimit spawn 1000(0 = 无限制)
商店物品: 手持该物品,然后执行 /shardadmin shop add golden_apple food 150
排行榜: 站在你想放置的位置,然后执行 /shardadmin holo create top1
MySQL: 在 database.yml 中设置 type: mysql,重启服务器,然后执行 /shardadmin db migrate。
🔌 PlaceholderAPI
| 占位符 |
输出 |
%shardcore_balance% |
余额 |
%shardcore_balance_formatted% |
1.5K / 2M |
%shardcore_top_position% |
在线玩家中的排名 |
%shardcore_afk_zone% |
当前 AFK 区域 |
%shardcore_afk_time% |
距离下次奖励的秒数 |
%shardcore_next_reward% |
下次奖励计时器 |
%shardcore_earned_today% |
今日从 AFK 获得的数量 |
%shardcore_spent_today% |
今日在商店花费的数量 |
适用于 TAB、记分板和任何 PlaceholderAPI 插件。
👨💻 开发者 API
ShardAPI.getBalance(uuid);
ShardAPI.give(uuid, 100, "reason");
ShardAPI.take(uuid, 50, "reason");
ShardAPI.transfer(from, to, 25);
在你的 plugin.yml 中将 jar 添加为 compileOnly 并设置 depend: [ShardCore]。仅对在线玩家有效,请从主线程调用。
⚠ 须知
give、take 和 set 仅对在线玩家生效。
- MySQL 设计用于单个服务器(不要在多个服务器之间共享同一个数据库)。
- 管理员自动获得最高倍率;请使用普通玩家进行测试。
- 更新后,删除
messages.yml 以便生成新消息。
❓ 常见问题
是否需要 Vault? 不需要,它完全独立运行。
崩溃后数据安全吗? 余额每 2 分钟保存一次,退出时和关闭服务器时也会保存。
我可以更改语言吗? 可以:在 config.yml 中设置 language: ar 或 en。
哪些版本兼容? 已在 1.21.11 上测试。1.20.x 和其他 1.21.x 应该也能工作,但未经测试。
💬 需要帮助或有建议?
[
]
欢迎提交 Bug 报告和功能请求。
✦ ShardCore ✦
The complete Shards economy for SMP servers
Standalone currency. No Vault. No EssentialsX. Full control.
---
✨ What is ShardCore?
ShardCore adds an independent Shards currency to your server and everything players need to earn and spend it: AFK zones, a GUI shop, quests, leaderboards, holograms and more. Every message, price, reward and menu is configurable from simple .yml files, and an in-game admin panel lets you edit most values without touching a file.
🚀 Features
|
Feature |
Details |
| 💰 |
Shards Economy |
Balance, pay, give, take, set, reset, leaderboard, full transaction history. Negative balances are blocked. |
| ⏳ |
AFK Zones |
Select zones with a wand. Per-zone reward, interval, daily limit and permission. BossBar countdown and ActionBar rewards. |
| 🛒 |
GUI Shop |
Categories, preview, purchase confirmation, discounts, daily purchase limits and permission-locked items. |
| 📜 |
Quests |
Daily and weekly quests with progress and a claim button. Each quest can be claimed once per period. |
| 🎁 |
Reward Sources |
Daily reward, first-join bonus, mob kills, advancements and admin gifts. |
| ⚡ |
Multipliers |
Permission-based multipliers (VIP, MVP...) and timed server events. |
| 🏆 |
Holograms |
Auto-refreshing Top Shards leaderboard. |
| 🛠 |
Admin Panel |
Manage balances, zones, shop, quests, rewards, logs and statistics from a GUI. |
| 🗄 |
Storage |
SQLite by default, MySQL supported, automatic SQLite backups. |
| 🔌 |
Integrations |
PlaceholderAPI, LuckPerms and TAB (all optional). |
| 🌍 |
Languages |
Arabic and English. |
| 👨💻 |
Developer API |
Use Shards from your own plugins. |
🛡 Safety
- Balances are cached and saved asynchronously (every 2 minutes, on quit and on shutdown).
- Shop purchases check inventory space first and refund automatically if delivery fails.
- Click-spam protection on purchases and quest claims.
- Anti-exploit: blocks placed by players and spawner mobs don't count for quests or mob rewards.
- Works without PlaceholderAPI, LuckPerms or TAB.
📋 Requirements
- Server: Spigot, Paper or Purpur
- Minecraft: 1.20.x - 1.21.x - 26.x
- Java: 17 , 21 and 25
- Optional: PlaceholderAPI, LuckPerms, TAB
💬 Commands
👤 Player commands (/shards, /shard, /sc)
| Command |
Description |
/shards |
Open the main menu |
/shards balance |
Show your balance |
/shards pay <player> <amount> |
Send Shards |
/shards top |
Leaderboard |
/shards history |
Your last transactions |
/shards shop |
Open the shop |
/shards quests |
Open quests |
/shards daily |
Claim the daily reward |
/shards help |
Help |
🛠 Admin commands (/shards and /shardadmin, alias /sa)
| Command |
Description |
/shards give/take/set <player> <amount> |
Edit balance (player must be online) |
/shards reset <player> |
Reset balance |
/shards info <player> |
Player summary |
/shards reload |
Reload configs |
/shardadmin or /shardadmin gui |
Admin panel |
/shardadmin wand |
Zone selection wand |
/shardadmin zone create/delete/list/info <name> |
Manage zones |
/shardadmin zone setreward/setinterval/setlimit <name> <value> |
Zone settings |
/shardadmin zone setperm <name> <permission/none> |
Restrict a zone |
/shardadmin shop add <id> <category> <price> |
Add the held item to the shop |
/shardadmin shop remove <id> / shop reload |
Manage products |
/shardadmin logs <player> / stats |
Logs and statistics |
/shardadmin event start <name> <multiplier> <minutes> |
Start a boost event |
/shardadmin event stop / event gift <amount> |
Stop event / gift everyone online |
/shardadmin holo create/delete <name> / list / reload |
Leaderboard holograms |
/shardadmin backup |
Create a SQLite backup |
/shardadmin db info / db migrate |
Database tools |
🔑 Permissions
| Permission |
Default |
Description |
shardcore.use |
everyone |
Main menu and history |
shardcore.balance |
everyone |
Check balance |
shardcore.pay |
everyone |
Send Shards |
shardcore.shop |
everyone |
Use the shop |
shardcore.quests |
everyone |
Quests and daily reward |
shardcore.admin |
op |
All admin features |
shardcore.admin.give / .take |
op |
Give / take Shards |
shardcore.admin.zones |
op |
Manage AFK zones |
shardcore.admin.shop |
op |
Manage the shop |
shardcore.admin.logs |
op |
View logs |
shardcore.multiplier.<name> |
none |
Multiplier defined in multipliers.yml |
LuckPerms example: /lp group vip permission set shardcore.multiplier.vip true
📂 Configuration Files
Everything lives in plugins/ShardCore/. Edit, then run /shards reload.
| File |
Purpose |
config.yml |
Language (ar / en), anti-exploit, support link |
messages.yml |
Every message in Arabic and English |
afk-zones.yml |
AFK zones (managed by commands) |
shop.yml |
Categories and products |
quests.yml |
Daily reward, mob rewards, quests |
rewards.yml |
First-join and advancement rewards |
multipliers.yml |
Permission multipliers |
holograms.yml |
Leaderboard hologram settings |
database.yml |
SQLite / MySQL and backups |
⚙ config.yml
language: en # ar / en
anti-exploit:
placed-blocks: true
spawner-mobs: true
🛒 shop.yml
categories:
blocks: {name: "&aBlocks", icon: GRASS_BLOCK, slot: 10}
tools: {name: "&6Tools", icon: DIAMOND_PICKAXE, slot: 12}
items:
diamond:
category: ores
material: DIAMOND
amount: 1
price: 100
discount: 0 # percent
steak:
category: food
material: COOKED_BEEF
amount: 16
price: 30
max-per-day: 5 # daily purchase limit
permission: "" # optional
📜 quests.yml
daily-reward:
amount: 50
cooldown-hours: 24
mob-reward:
enabled: true
chance: 100
default: 1
mobs: {ZOMBIE: 2, SKELETON: 2, CREEPER: 3, ENDERMAN: 5}
quests:
kill_zombies:
type: daily
name: "&aKill 20 Zombies"
event: KILL
target: ZOMBIE
amount: 20
reward: 40
🎁 rewards.yml
first-join:
enabled: true
amount: 100
achievements:
enabled: true
default: 5
ignore-prefixes: ["recipes/"]
overrides:
"story/mine_diamond": 50
"end/kill_dragon": 500
⚡ multipliers.yml
apply-to: [afk, mob, quest, daily, achievement, event]
multipliers:
vip: 1.5
mvp: 2.0
legend: 3.0
🏆 holograms.yml
refresh-seconds: 60
top-lines: 10
title: "&b&lTop Shards"
line-format: "&e#%pos% &f%player% &7- &e%amount%"
🗄 database.yml
type: sqlite # sqlite or mysql
mysql:
host: localhost
port: 3306
database: shardcore
user: root
password: ""
backup:
auto-enabled: true
every-hours: 6
keep: 10
🔧 Quick Setup
AFK zone
/shardadmin wand, then left click one corner and right click the opposite corner
/shardadmin zone create spawn
/shardadmin zone setreward spawn 10
/shardadmin zone setinterval spawn 60
/shardadmin zone setlimit spawn 1000 (0 = unlimited)
Shop item: hold the item, then /shardadmin shop add golden_apple food 150
Leaderboard: stand where you want it, then /shardadmin holo create top1
MySQL: set type: mysql in database.yml, restart, then /shardadmin db migrate.
🔌 PlaceholderAPI
| Placeholder |
Output |
%shardcore_balance% |
Balance |
%shardcore_balance_formatted% |
1.5K / 2M |
%shardcore_top_position% |
Rank among online players |
%shardcore_afk_zone% |
Current AFK zone |
%shardcore_afk_time% |
Seconds to next reward |
%shardcore_next_reward% |
Next reward timer |
%shardcore_earned_today% |
Earned today from AFK |
%shardcore_spent_today% |
Spent today in shop |
Works with TAB, scoreboards and any PlaceholderAPI plugin.
👨💻 Developer API
ShardAPI.getBalance(uuid);
ShardAPI.give(uuid, 100, "reason");
ShardAPI.take(uuid, 50, "reason");
ShardAPI.transfer(from, to, 25);
Add the jar as compileOnly and depend: [ShardCore] in your plugin.yml. Works for online players, call from the main thread.
⚠ Good to know
give, take and set work on online players only.
- MySQL is meant for a single server (don't share one database between servers).
- Operators receive the highest multiplier automatically; test with a normal player.
- After updating, delete
messages.yml so the new messages generate.
❓ FAQ
Does it need Vault? No, it is fully standalone.
Is data safe after a crash? Balances save every 2 minutes, on quit and on shutdown.
Can I change the language? Yes: language: ar or en in config.yml.
Which versions work? Tested on 1.21.11. 1.20.x and other 1.21.x should work but are untested.
💬 Need help or have a suggestion?
[
]
Bug reports and feature requests are welcome.
评论 0
登录后参与评分
还没有评论,来抢沙发吧