? CappyShards
专为 PaperMC 打造的终极水晶与碎片经济、挂机奖励及智能 GUI 商店
轻量级 • 100% 原版客户端兼容 • 超安全防刷引擎 • 异步 SQLite 支持
功能特性 • 快速入门 • 游戏内商店 • 碎片倍率 • 占位符变量 • 指令与权限 • 配置文件
? 语言支持: English • Tiếng Việt
? 为什么选择 CappyShards?
厌倦了那些导致 TPS 卡顿、内存泄漏或容易被背包点击漏洞利用的经济类插件吗?
CappyShards 是一款高级且经过生产环境验证的服务器解决方案,专为现代 Paper/Purpur 1.21+ Minecraft 网络从零构建。它引入了次级高级经济系统(碎片/Shards)、带有不可被其他插件覆盖的动作栏显示的挂机奖励区域、支持即时单位和批量调整的直观游戏内商店、功能完备的可消耗型加成道具,以及坚如磐石的并发保护机制。
最重要的是? 无需任何客户端模组或资源包。所有功能均可在原版 Minecraft 客户端中无缝运行!
? 功能特性
⚡ 1. 高性能碎片经济系统
- 异步数据库事务: 基于 SQLite 和 HikariCP 连接池。在主游戏线程上实现零卡顿、无冻结体验。
- 原子性防刷锁定: 使用线程安全的原子标志(
AtomicBoolean),防止快速点击刷物品、背包拖拽漏洞及数据包异常。
- 玩家间转账: 提供安全的
/shard pay 指令,具备自我转账预防、余额验证及交易并发保护功能。
⏳ 2. 挂机碎片奖励与主导动作栏
- 开箱即用: 预配置为世界
ShardAFK。
- 不受 TPS 影响的时间追踪: 使用毫秒级时间戳(
System.currentTimeMillis())计算,确保服务器延迟波动不会导致玩家倒计时漂移或延迟。
- 优先级动作栏引擎: 每 0.5秒(10刻) 异步脉冲一次,即使其他插件发送动作栏消息,也能保证你的挂机倒计时始终可见。
- 祝贺奖励横幅: 在平滑返回倒计时之前,显示持续 3 秒的醒目奖励信息。
- 等级倍率: 为 VIP 和捐赠者提供可定制的各层级支付金额。
?️ 3. 内置网络安全防护
- 防小号保护: 限制每个 IP 地址同时允许的最大账号数量(可在
config.yml 中配置)。
- 防 VPN 与代理屏蔽: 通过 IP 情报 API(如
proxycheck.io)执行异步预登录 HTTP 检查,在机器人和 VPN 用户加入前将其拒绝。
? 4. 碎片倍率消耗品
- 即时生效药水: 自定义水瓶,右键点击后立即授予限时碎片收入倍率。
- 无饮用延迟: 瞬间消耗,无需原版 1.6 秒的饮用动画。
- 视听反馈: 激活时播放升级音效和粒子特效。
- 完全可定制: 可在
item.yml 中配置纹理、自定义模型数据、名称、描述文本、声音和粒子效果。
? 5. 智能游戏内商店
无需自定义材质包即可享受直观、玩家友好的购物体验:
- 清晰的分类浏览: 将物品组织到自定义部门(武器、消耗品、材料等),支持自定义图标和颜色渐变。
- 单位与批量购买: 玩家可通过简单的
+ 和 - 按钮轻松切换购买单个物品(1 至 64)或批量堆叠(1 至 36)。
- 智能堆叠检测: 不可堆叠的装备(剑、盔甲、工具)会自动禁用堆叠模式,以防止问题发生。
- 即时购买预览: 确认前清晰显示所选数量、总成本和当前余额。
- 虚拟奖励与指令: 支持在
shop.yml 中使用可选的控制台 commands 来发放箱子钥匙、等级或自定义插件物品。
- 库存安全: 自动在交易前检查可用库存空间,避免物品掉落。
? 6. 离线碎片累积
- 被动离线进度: 即使玩家完全下线,也能累积碎片!
- 基于等级的时长上限: 可在
config.yml 中为每个等级配置最大累积时间(例如:默认 2 小时,VIP 6 小时,VIP+ 12 小时)。
- 灵活的权限控制: 使用
cappy.offline.shard 全局授予,或使用 cappy.offline.shard.<rank> 按等级授予。
- 回归通知: 重新连接的玩家会收到详细的聊天通知,显示其离线时间和获得的碎片数量。
⚡ 碎片倍率加成道具
管理员可以将临时碎片倍率作为任务奖励、箱子奖品或商店商品发放!
# 给自己一个持续 30 分钟的 2x 倍率:
/cappy give shard_multiplier 2 30
# 给某玩家一个持续 60 分钟的 1.5x 倍率:
/cappy give Steve shard_multiplier 1.5 60
- 即时右键: 在任何地方右键即可立即激活增益效果。
- 收益倍增: 激活期间,所有挂机奖励将按比例倍增(例如:10 碎片 × 2.0 = 20 碎片)。
- HUD 指示器: 动作栏会自动附加当前生效的倍增倍率(例如:
Receiving Shards in: 45s (x2))。
? PlaceholderAPI 集成
CappyShards 提供了全面的 PlaceholderAPI (PAPI) 占位符,可用于你的计分板、TAB 列表、聊天、全息图或 DeluxeMenus:
| 占位符 |
描述 |
示例输出 |
%cappyshards_balance% |
精确的碎片余额(原始数字) |
1500 |
%cappyshards_shards% |
%cappyshards_balance% 的别名 |
1500 |
%cappyshards_balance_formatted% |
带千位分隔符的碎片余额 |
1,500 |
%cappyshards_shards_formatted% |
格式化余额的别名 |
1,500 |
%cappyshards_afk_time% |
距离下次挂机奖励剩余的秒数 |
42 |
%cappyshards_afk_remaining% |
挂机倒计时的别名 |
42 |
%cappyshards_rank_reward% |
基于玩家等级的碎片发放量 |
50 |
%cappyshards_multiplier% |
当前的碎片倍增增益(若无则为 1) |
2 |
%cappyshards_multiplayer% |
%cappyshards_multiplier% 的别名 |
2 |
%cappyshards_multiplier_formatted% |
带有前缀 x 的倍率显示 |
x2 |
%cappyshards_multiplier_remaining% |
剩余增益时间的秒数 |
1799 |
%cappyshards_multiplier_time_formatted% |
人类可读格式的剩余增益时间 |
29m 59s |
%cappyshards_has_multiplier% |
检查玩家是否拥有有效的增益 |
true / false |
%cappyshards_multiplier_tag% |
格式化后的增益标签(若无有效增益则为空) |
(x2) |
%cappyshards_offline_max_hours% |
该玩家离线碎片积累的最大小时数 |
6 |
? 命令与权限
命令
| 命令 |
别名 |
权限 |
描述 |
/cappyshard |
/shard, /shards, /cshard, /cappy |
cappyshards.use |
查看你当前的碎片余额 |
/cappyshard pay <player> <amount> |
|
cappyshards.use.pay |
向其他在线玩家转账碎片 |
/cappyshard shop |
/shardshop |
cappyshards.use.shop |
打开碎片目录商店 GUI |
/cappyshard give [player] shard_multiplier <multiplier> [minutes] |
|
cappyshards.admin |
给予即时的碎片倍增药水 |
/cappyshard add <player> <amount> |
|
cappyshards.admin |
增加玩家的碎片余额 |
/cappyshard set <player> <amount> |
|
cappyshards.admin |
设置玩家的精确碎片余额 |
/cappyshard remove <player> <amount> |
|
cappyshards.admin |
从玩家余额中扣除碎片 |
/cappyshard reload |
|
cappyshards.admin |
重载所有配置、物品并重启管理器 |
权限
cappyshards.use (默认: true) — 允许查看余额。
cappyshards.use.pay (默认: true) — 允许向其他玩家发送碎片。
cappyshards.use.shop (默认: true) — 允许打开碎片商店 GUI。
cappyshards.admin (默认: op) — 管理访问权限(设置、添加、移除、给予、重载)。
cappyshards.bypass.zone (默认: op) — 无视当前世界限制,接收挂机奖励。
cappyshards.rank.<name> — 授予在 config.yml 中配置的特定等级发放量。
cappy.offline.shard — 离线时积累碎片的基线权限。
cappy.offline.shard.<rank> — 针对特定等级的离线积累权限(如 cappy.offline.shard.vipplus, cappy.offline.shard.vip)。
?️ 配置文件
所有配置均使用现代的 MiniMessage 渐变和十六进制颜色格式。
config.yml:常规设置、挂机间隔、启用的世界、反小号/VPN 以及等级发放率。
messages.yml:100% 可自定义的消息、提示和前缀。
item.yml:自定义碎片倍增瓶(名称、描述、自定义模型数据、音效和粒子效果)。
Shop/catalogue.yml:配置目录分类、布局大小、图标和描述文本。
Shop/shop.yml:配置每个分类中的物品、价格、数量以及可选的控制台奖励命令。
? 快速开始
- 从 Releases 或 Modrinth 下载最新的
CappyShards-1.0.0.jar。
- 将 jar 文件放入服务器的
plugins/ 文件夹中。
- (可选) 安装 PlaceholderAPI 以支持计分板和 TAB 列表集成。
- 启动服务器。配置文件将自动生成。
- 根据服务器需求自定义
config.yml、messages.yml、item.yml 和 Shop/shop.yml。
- 运行
/cappyshard reload 即可即时应用更改!
?️ 从源码构建
git clone https://github.com/quocdat251107-del/CappyShard.git
cd CappyShard
./gradlew build
编译后的 jar 文件将位于 build/libs/CappyShards-1.0.0.jar。
CappyShards 是由 Cappy Community 用 ❤️ 创建的开源项目。
如果你喜欢这个插件,请在 GitHub 上给仓库点个星!
? Why CappyShards?
Tired of clunky economy plugins that cause TPS lag, leak memory, or get exploited by inventory click hacks?
CappyShards is an advanced, production-ready server solution crafted from the ground up for modern Paper/Purpur 1.21+ Minecraft networks. It introduces a secondary premium economy (Shards), an AFK reward zone with an action bar display that cannot be overridden by other plugins, an intuitive in-game shop with instant unit & stack adjustments, functional consumable boosters, and bulletproof concurrency protection.
Best of all? No client mods or resource packs required. Everything runs seamlessly on vanilla Minecraft clients!
? Features
⚡ 1. High-Performance Shard Economy
- Async Database Transactions: Backed by SQLite and HikariCP connection pooling. Zero lag or freezing on the main game thread.
- Atomic Anti-Dupe Locking: Uses thread-safe atomic flags (
AtomicBoolean) preventing fast-click dupes, inventory drag exploits, and packet glitches.
- Player-to-Player Transfers: Secure
/shard pay command with self-transfer prevention, balance validation, and transaction concurrency guards.
⏳ 2. AFK Shard Rewards & Dominant Action Bar
- Ready Out-of-the-Box: Pre-configured for world
ShardAFK.
- TPS-Immune Time Tracking: Calculated using millisecond epoch timestamps (
System.currentTimeMillis()) so server lag spikes won't drift or delay player countdowns.
- Priority Action Bar Engine: Pulses every 0.5s (10 ticks) asynchronously, guaranteeing your AFK countdown remains visible even when other plugins send action bar messages.
- Congratulatory Reward Banner: Displays an eye-catching reward message for 3 seconds before smoothly returning to the countdown.
- Rank Multipliers: Reward VIPs and donors with customizable payout amounts per tier.
?️ 3. Built-In Network Security
- Anti-Alt Protection: Limits maximum accounts allowed per IP simultaneously (configurable in
config.yml).
- Anti-VPN & Proxy Shield: Performs asynchronous pre-login HTTP checks with IP intelligence APIs (e.g.
proxycheck.io) to reject bots and VPN users before they join.
? 4. Shard Multiplier Consumables
- Instant-Use Potions: Custom Water Bottles that immediately grant a timed Shard earnings multiplier upon right-click.
- No Drinking Delay: Consumes instantly without the 1.6-second vanilla drinking animation.
- Visual & Audio Feedback: Plays level-up chimes and sparkles upon activation.
- Fully Customizable: Configure textures, custom model data, names, lores, sounds, and particles in
item.yml.
? 5. Smart In-Game Shop
An intuitive, player-friendly shopping experience without needing custom texture packs:
- Clean Category Browsing: Organize items into custom departments (Weapons, Consumables, Materials, etc.) with customizable icons and color gradients.
- Unit & Bulk Stack Purchasing: Players can easily switch between buying single items (1 to 64) or bulk stacks (1 to 36) with simple
+ and - buttons.
- Smart Stack Detection: Non-stackable equipment (swords, armor, tools) automatically disables stack mode to prevent issues.
- Instant Purchase Preview: Clear summary showing selected quantity, total cost, and current balance before confirming.
- Virtual Rewards & Commands: Supports optional console
commands in shop.yml for giving Crate Keys, ranks, or custom plugin items.
- Inventory Safe: Automatically checks available inventory space before transactions to avoid dropped items.
? 6. Offline Shard Accumulation
- Passive Offline Progress: Players can accumulate Shards even while completely logged off!
- Rank-Based Duration Caps: Configurable maximum accumulation time per rank in
config.yml (e.g. 2h for Default, 6h for VIP, 12h for VIP+).
- Flexible Permission Control: Grant globally using
cappy.offline.shard or per-rank with cappy.offline.shard.<rank>.
- Welcome-Back Notification: Reconnecting players receive a detailed chat notification showing their offline time and shards earned.
⚡ Shard Multiplier Boosters
Admins can distribute temporary Shard Multipliers as quest rewards, crate prizes, or store items!
# Give a 2x Multiplier for 30 minutes to yourself:
/cappy give shard_multiplier 2 30
# Give a 1.5x Multiplier for 60 minutes to a player:
/cappy give Steve shard_multiplier 1.5 60
- Instant Right-Click: Right-click anywhere to immediately activate the boost.
- Boosted Payouts: While active, all AFK rewards are multiplied (e.g. 10 Shards × 2.0 = 20 Shards).
- HUD Indicator: The action bar automatically appends the active multiplier (e.g.
Receiving Shards in: 45s (x2)).
? PlaceholderAPI Integration
CappyShards provides comprehensive PlaceholderAPI (PAPI) placeholders ready for your Scoreboard, TAB list, Chat, Holograms, or DeluxeMenus:
| Placeholder |
Description |
Example Output |
%cappyshards_balance% |
Exact Shard balance (raw number) |
1500 |
%cappyshards_shards% |
Alias for %cappyshards_balance% |
1500 |
%cappyshards_balance_formatted% |
Shard balance with comma separators |
1,500 |
%cappyshards_shards_formatted% |
Alias for formatted balance |
1,500 |
%cappyshards_afk_time% |
Remaining seconds until next AFK reward |
42 |
%cappyshards_afk_remaining% |
Alias for AFK countdown |
42 |
%cappyshards_rank_reward% |
Shard payout amount based on player's rank |
50 |
%cappyshards_multiplier% |
Active Shard multiplier booster (or 1 if none) |
2 |
%cappyshards_multiplayer% |
Alias for %cappyshards_multiplier% |
2 |
%cappyshards_multiplier_formatted% |
Multiplier prefixed with x |
x2 |
%cappyshards_multiplier_remaining% |
Remaining booster time in seconds |
1799 |
%cappyshards_multiplier_time_formatted% |
Human-readable remaining booster time |
29m 59s |
%cappyshards_has_multiplier% |
Check if player has an active booster |
true / false |
%cappyshards_multiplier_tag% |
Formatted booster tag (empty if none active) |
(x2) |
%cappyshards_offline_max_hours% |
Maximum offline shard accumulation hours for the player |
6 |
? Commands & Permissions
Commands
| Command |
Aliases |
Permission |
Description |
/cappyshard |
/shard, /shards, /cshard, /cappy |
cappyshards.use |
View your current Shard balance |
/cappyshard pay <player> <amount> |
|
cappyshards.use.pay |
Transfer Shards to another online player |
/cappyshard shop |
/shardshop |
cappyshards.use.shop |
Open the Shard Catalogue shop GUI |
/cappyshard give [player] shard_multiplier <multiplier> [minutes] |
|
cappyshards.admin |
Give an instant Shard Multiplier potion |
/cappyshard add <player> <amount> |
|
cappyshards.admin |
Add Shards to a player's balance |
/cappyshard set <player> <amount> |
|
cappyshards.admin |
Set a player's exact Shard balance |
/cappyshard remove <player> <amount> |
|
cappyshards.admin |
Deduct Shards from a player's balance |
/cappyshard reload |
|
cappyshards.admin |
Reload all configs, items, and restart managers |
Permissions
cappyshards.use (Default: true) — Allows checking balance.
cappyshards.use.pay (Default: true) — Allows sending Shards to other players.
cappyshards.use.shop (Default: true) — Allows opening the Shard Shop GUI.
cappyshards.admin (Default: op) — Administrative access (set, add, remove, give, reload).
cappyshards.bypass.zone (Default: op) — Receive AFK rewards regardless of the current world.
cappyshards.rank.<name> — Grants specific rank payout amounts configured in config.yml.
cappy.offline.shard — Base permission to accumulate shards while offline.
cappy.offline.shard.<rank> — Rank-specific offline accumulation permissions (cappy.offline.shard.vipplus, cappy.offline.shard.vip).
?️ Configuration Files
All configurations use modern MiniMessage gradient and hex formatting.
config.yml: General settings, AFK intervals, enabled worlds, Anti-Alt/VPN, and Rank payout rates.
messages.yml: 100% customizable messages, alerts, and prefixes.
item.yml: Customize the Shard Multiplier bottle (name, lore, custom model data, sounds, and particles).
Shop/catalogue.yml: Configure catalogue categories, layout sizes, icons, and lores.
Shop/shop.yml: Configure items in each category, prices, quantities, and optional console reward commands.
? Quick Start
- Download the latest
CappyShards-1.0.0.jar from Releases or Modrinth.
- Place the jar file into your server's
plugins/ folder.
- (Optional) Install PlaceholderAPI for scoreboard & tab integration.
- Start your server. Configuration files will generate automatically.
- Customize
config.yml, messages.yml, item.yml, and Shop/shop.yml to fit your server's needs.
- Run
/cappyshard reload to apply your changes on the fly!
?️ Building from Source
git clone https://github.com/quocdat251107-del/CappyShard.git
cd CappyShard
./gradlew build
The compiled jar will be available in build/libs/CappyShards-1.0.0.jar.
CappyShards is an open-source project created with ❤️ by the Cappy Community.
If you enjoy this plugin, consider starring the repository on GitHub!
评论 0
登录后参与评分
还没有评论,来抢沙发吧