欢迎加入 DupeForums 官方 QQ 群交流:1040409281 —— 立即领取2张资源兑换券,获取最新资源更新、提问反馈、与创作者直接沟通!
SMP Shards - AFK & Shop 资源封面

SMP Shards - AFK & Shop vv1.1.4

挂机、击杀、玩家转账均可获得碎片,内置 215 种商店商品与排行榜,支持 SQLite/MySQL 与 Folia。

分类: 经济 · 由 Kimonomc 上传。

发布于 2026-10-10 · 销量: 0 · 评分: 0.0 (0)

Minecraft 兼容性: MC 1.21.4 SpigotPaperPurpurFolia

描述

smpshards.png

1784409139861.jpeg

SMP分片
:基于区域的分流货币、AFK奖励、击杀奖励、玩家支付、215个捆绑商店产品、排行榜、SQLite/MySQL和Folia支持

,为现代SMP服务器创建完整的进度货币。奖励世界卫队或SMP区域内的玩家,授予PvP击杀分片,应用权限奖励,启用安全玩家支付,运营可配置的多类别商店,显示缓存排行榜,暴露占位API值,并通过SQLite或MySQL异步持久化每个账户。

纸质 • Purpur • Folia • Minecraft 1.21.4+ • Java 21

什么是SMP碎片?

SMP 碎片是一款独立的进度货币插件,专为生存、吸血、盒子、PvP、经济和竞技SMP服务器设计。

玩家可以通过留在设定的生成区域内、击败其他玩家、获得行政奖励或从其他玩家那里收取报酬来获得碎片。然后他们可以通过一个可配置的物品商店来使用这些碎片,商店里有普通的Minecraft资源、装备、特殊物品、生成器、箱子钥匙和自定义SMP武器。

该插件包含自己的账户系统、SQLite 和 MySQL 持久化、商店引擎、排行榜界面、AFK 传送流程、占位API扩展、MiniMessage展示、可配置音效、公共API以及可取消的增失事件。

Vault并非必需。分片经济是独立的,其游戏模块可以启用或禁用,货币名称和平衡模型可以配置,而无需取代服务器的正常货币经济。

为现代SMP进程打造

  • 创造第二种进阶货币——在现有的避难所经济旁边运行碎片,但不替代普通货币。
  • 奖励受控活动——在选定的世界卫队或SMP区域内授予碎片。
  • 奖励竞技PvP——为合法玩家击杀提供可配置的碎片数量。
  • 减少杀戮刷怪——防止同一受害者连续奖励。
  • 通过权限来提升奖励——排名可以获得最高的生成或击杀奖励。
  • 给玩家设定消费目标——使用捆绑的商店目录,或者自定义产品和价格。
  • 连接ArkFlame产品——配置SMP生成器、SMP箱和SMP武器的指令投递。
  • 鼓励使用AFK区域——提供移动取消的传送倒计时,直达已配置的AFK目的地。
  • 创造可见的竞争——通过分页玩家排行榜显示缓存的碎片排名。
  • 在 Folia 上安全运行——玩家、全局和异步工作都通过拥有权感知的调度器进行路由。

核心功能

  • 独立的分片经济——没有强制性的避难所依赖。
  • 64位余额——分片账户使用Java长值。
  • 非负余额保护——账户不能故意保持负余额。
  • 溢出安全的添加——添加使用精确运算而非静默包裹。
  • 原子减法——同时扣除余额不能透支同一账户。
  • 自定义货币命名——配置单数和复数货币名称。
  • 紧凑数字格式——可配置的十进制和后缀,如K、M、B、T和Q。
  • 基于区域的被动生成——玩家在指定区域内获得碎片。
  • WorldGuard支持——使用现有WorldGuard地区标识符。
  • SMP 区域支持 — 通过其公共区域 API 使用 ArkFlame SMP 区域。
  • 复合自动模式——接受任一供应商的匹配区域。
  • 移动查询优化——仅在块座标变化时重新检查区域。
  • 可配置生成间隔——控制玩家获得碎片的频率。
  • 可配置的基础生成量——定义每个周期的正常奖励。
  • 权限生成奖励——配置任意权限节点和奖励值。
  • 最高奖励分辨率——重叠的等级权限不会无限制叠加。
  • 区域入口展示——可配置聊天、标题、字幕、动作栏和声音反馈。
  • 实时生成倒计时——动作条计时器显示下一个奖励时间。
  • 玩家击杀奖励——用可配置的碎片数量奖励杀手。
  • 击杀许可加成——为选定等级提供更高奖励。
  • 连续受害者反农场——同一受害者反复杀人可以忽略。
  • 可接收的增益事件——其他插件可以取消或修改分片增益。
  • 可回收损失事件——其他插件可以取消或修改分片扣除。
  • 玩家支付——在线玩家可以直接转移分片。
  • 付款回滚——收款人送达失败,会恢复发送方的借记。
  • 自助支付保护——玩家不能将碎片转移给自己。
  • 多类别库存商店——通过可配置的YAML菜单浏览产品。
  • 215个捆绑产品定义——包含十个类别。
  • 167个普通Minecraft产品定义——方块、资源、农场、武器、护甲、工具和特殊物品。
  • 48个可选生态系统产品定义——生成器、箱子钥匙和SMP武器。
  • 可配置的产品价格——每个商品目录都控制自己的分片成本。
  • 可配置产品数量——销售单件商品、捆绑包、设备或命令交付的产品。
  • 可配置页面和槽位——将每个产品精确放置在其应在的位置。
  • 类别权限——必要时限制完整类别。
  • 不可用产品过滤——没有有效配送路线的产品会被隐藏。
  • 库存容量预检——直接购买商品可能需要足够的存储空间才能扣款。
  • 命令交付支持 — 为外部产品调度配置好的控制台命令。
  • 替代传递分支——使用 ::呃:R:: 选择第一个可用动作。
  • 安全退款状态——已知的交付前故障可以恢复被借记的碎片。
  • 分页排行榜图形界面——展示带玩家头部的缓存排名。
  • 异步排行榜刷新——排名被从玩家自有的执行中剔除。
  • 动态顶位占位符——通过PlaceholderAPI暴露任何缓存的排名。
  • 移动取消的AFK传送——只有在玩家保持在配置阈值内后才会传送。
  • 异步传送完成——使用现代纸传送行为。
  • SQLite 持久化——无需外部数据库即可立即运行。
  • MySQL 持久化——可配置的远程数据库和 HikariCP 池。
  • 异步数据库执行器——JDBC账户操作不在播放器线程上运行。
  • 批量刷污账户——更改余额会按可配置的间隔一起保存。
  • 最终关闭清除——加载的账户在仓库关闭前会被持久保存。
  • MiniMessage 支持——渐变、十六进制颜色、装饰和现代组件。
  • 旧的&符号格式化——现有和颜色字符串依然可用。
  • 可配置的重音标签——通过一个品牌值更改每一个<口音>组件。
  • 可配置音效——生成、进入区域、击杀、购买、错误和挂机操作。
  • 占位API扩展——平衡、排名、生成计时器、AFK状态和全局设置。
  • 公开阅读API——检查账户、余额、排行榜和功能状态。
  • 安全的 YAML 默认合并——插入缺失的捆绑键而不替换现有值。
  • 原子YAML写入——可变配置快照使用临时文件,支持的则使用原子移动。
  • 异步重新加载准备——配置文件和菜单文件在玩家拥有操作之外自动加载。
  • Folia原生调度——全局、玩家和异步工作使用Paper的所有权调度器。

独立分片货币

SMP 分片为每位玩家存储一个账户 UUID,并保留玩家最后已知的用户名以便管理查询和排行榜显示。

  • UUID身份——名称更改不会产生第二重平衡。
  • 姓氏查询——管理员命令可以通过用户名查找持久账户。
  • 64位平衡范围——支持大型长期经济。
  • 零底板保护——负初始值或指定值被固定为零。
  • 精确溢出检测——无效添加失败,而非损坏账户。
  • 原子比较与设定扣除——同时损失不能重复使用相同的碎片。
  • 脏状态追踪——只有被更改的缓存账户才进入正常的周期性持久批处理。

货币名称可配置:

代码:
currency:
  singular: "Shard"
  plural: "Shards"

数字格式也可以配置:

代码:
number-format:
  enabled: true
  decimals: 1
  suffixes: ["", "K", "M", "B", "T", "Q"]

这可以渲染出1.5K、2M,或者在关闭紧凑格式时的精确原始数值。

基于区域的被动生成

玩家可以通过留在设定的生成区域内来获得碎片。

默认行为:

  • 奖励间隔——15秒。
  • 基础奖励——1块碎片。
  • 世代区域——挂机和afk_zone。
  • 权限奖励决议——只添加最高的匹配奖金。
  • 条目反馈——聊天消息、标题、字幕和声音。
  • 倒计时反馈——下一次奖励前的实时动作条。
  • 奖励反馈——聊天、标题、字幕、声音和刷新倒计时。
  • 退出反馈——留言和动作栏清理。

有效奖励公式如下:

代码:
final reward = base amount + highest matching permission bonus

配置好的加成不会全部加在一起。持有多代加成权限的玩家将获得最高值,防止等级叠加意外膨胀。

默认发电配置:

代码:
interval-seconds: 15
base-amount: 1
permission-bonuses:
  smpshards.generation.extra_two: 2
  smpshards.generation.extra_three: 3
presentation:
  enter-chat: true
  enter-title: true
  leave-chat: true
  reward-chat: true
  reward-title: true
  timer-action-bar: true
  enter-title-times:
    fade-in-ticks: 10
    stay-ticks: 40
    fade-out-ticks: 10
  reward-title-times:
    fade-in-ticks: 5
    stay-ticks: 25
    fade-out-ticks: 5

WorldGuard 和 SMP Regions 支持

SMP 分片不会硬依赖于某个区域插件。提供者模式决定了发电区匹配的读取来源。

  • 自动——查询所有可用供应商,并接受来自WorldGuard或SMP区域的匹配。
  • WORLDGUARD — 仅查询WorldGuard。
  • SMP_REGIONS — 仅查询SMP区域。

默认提供者配置:

代码:
region-provider:
  mode: AUTO
  generation-regions:
    - afk
    - afk_zone
  check-only-when-block-position-changes: true

提供者模式别名经过规范化,因此像smp区域、smp区域和SMP_REGIONS这样的数值会被解析为相同的模式。

区域名称的比较对比不区分大小写。在 AUTO 模式下,任一提供者返回的匹配标识符会合并为一个有效区域集。

移动查询优化

区域成员通常仅在跨越区块边界后才需要更改。

启用默认选项后,同一块内的头部旋转和小幅移动不会触发其他区域提供者查询。

  • 较低的区域查询频率——偏航、俯仰和子块移动被忽略。
  • 即时区块转移检查——穿越X、Y、Z、世界或传送边界会刷新状态。
  • 每名玩家奖励计时——在玩家的实体调度器上评估被追踪的生成状态。
  • 一秒钟的呈现节奏——计时器保持可读,不会有每滴的垃圾信息。

基于权限的奖励

奖励生成和击杀奖励有独立的许可奖励地图。

示例:

代码:
permission-bonuses:
  rank.vip: 2
  rank.mvp: 5
  rank.legend: 10

拥有三种权限的玩家只能获得最高奖励10。这使得系统与继承权限组兼容,而无需将每个继承奖励相乘。

权限节点和值没有硬编码。服务器所有者可以创建网络所需的任何等级结构。

玩家击杀奖励

当一名玩家被另一名玩家击杀时,杀手可以获得碎片奖励。

  • 可配置的基础数量——默认15个碎片。
  • 可配置的等级加成——添加最高的匹配击杀加成。
  • 需要真正的杀手——环境死亡不会带来奖励。
  • 自杀保护——玩家不能自我奖励。
  • 连续受害者保护——反复杀死同一名玩家可能会停止奖励。
  • 不同受害者重置——击败另一名玩家会改变该杀手的追踪目标。
  • 可变增益事件——积分可以改变或取消最终奖励。
  • 可配置的信息和声音——成功的奖励能提供即时反馈。

默认配置:

代码:
kill-rewards:
  base-amount: 15
  prevent-consecutive-same-victim: true
  permission-bonuses:
    smpshards.kill.extra_ten: 10
    smpshards.kill.extra_twenty: 20

玩家间支付

玩家可以通过 /shards pay 将分片转移给其他在线玩家。

  • 仅接受正的整数——无效或负数的则被拒绝。
  • 在线精确目标——支付当前在线玩家。
  • 自付拒付——发送方和接收方必须是不同的参与者。
  • 余额核查——资金不足在接收人入账前被拒绝。
  • 损失事件——发送方借记可以被取消或调整。
  • 收益事件——接收者积分可以被取消或调整。
  • 接收方拥有的交付——信用执行通过目标玩家的调度器路由。
  • 自动回滚——信用失败或调度器拒绝时,会恢复发送方的借记金额。
  • 发送和接收者分别发送消息——双方玩家都收到已应用的转账金额。

可配置多类别商店

SMP碎片包含一个YAML驱动的库存商店,可以作为类别选择器运行,或直接打开一个默认类别。

捆绑主菜单包含十个类别定义:

  • 区块——24件产品。
  • 资源 — 24 种产品。
  • 农业——24种产品。
  • 武器——24种产品。
  • 军械库 — 26件产品。
  • 工具 — 22 种产品。
  • 特别版——23种产品。
  • 生成器——20个可选的SMP生成器产品。
  • 箱子钥匙——7个可选的SMP箱子产品。
  • SMP武器——21款可选SMP武器产品。

总量捆绑目录定义:215。

每个类别都可以配置:

  • 库存所有权证。
  • 库存数量。
  • 总页数。
  • 类别权限。
  • 下一页。
  • 上一页项目。
  • 后面的那条。
  • 填充内容。
  • 产品页面。
  • 产品槽。
  • 产品价格。
  • 产品数量。
  • 展示材料。
  • 显示名称。
  • 展示背景故事。
  • 发光状态。
  • 自定义模型数据。
  • 生成器类型的元数据。
  • 直接项目交付或基于命令的交付。

167 捆绑 Minecraft 产品

常规目录定义涵盖建造、农耕、战斗、进度和终局物资。

  • 方块——石头、鹅卵石、木板、原木、玻璃、砖块、砂岩、下界砖、终结石、石英、赤陶、黑曜石、荧光石、海灯、棱镜石和终结石。
  • 资源——煤炭、铁、黄金、铜、红石、青金石、石英、钻石、祖母绿、下界岩、紫水晶、回声碎片、棱晶材料、烈焰棒、珍珠、史莱姆、岩浆奶油、幽灵泪、鹦鹉螺壳、海之心、下界星辰和不死图腾。
  • 农业——作物、甜瓜、甘蔗、仙人掌、竹子、海带、可可、地狱疣、合唱果、苹果、金胡萝卜、骨粉、幼苗、蜂巢、蜂蜜块、海绵、蛋和龟蛋。
  • 武器——剑、弓、弩、箭、幽灵箭、尖箭、狼牙棒、三叉戟、盾牌、斧头、附魔书籍和终结水晶。
  • 军械库——皮革、锁子甲、铁、黄金、钻石和下界合金护甲件,龟壳和鞘翅。
  • 工具——镐、斧头、铲子和锄头,涵盖多个材料等级。
  • 特殊——金苹果、附魔金苹果、珍珠、末影之眼、经验瓶、马鞍、名牌、铅芯、望远镜、刷子、鞘翅、烟花、附魔书籍、潜影壳、龙头、导管、终结水晶、重生锚、磁石、附魔桌和铁砧。

价格、数量、页面、显示名称和位置均可完全编辑。捆绑的数值只是起始示例,而非强制性的经济平衡。

20个SMP生成器列表

捆绑的SMP生成器类别包括:

猪、牛、羊、鸡、兔子、鱿鱼、海豚、、狼、猫、豹猫、狐狸、马、驴、羊驼、蘑菇、蜜蜂、熊猫、北极熊和鹦鹉生成器。

这些产品使用命令传递,只有在其配置的集成路由可用时才能显示。

7个SMP箱子密钥列表捆

绑的SMP箱子类别包括:

普通、非凡、稀有、史诗、传奇、神话和投票箱密钥。

每个产品都可以定义自己的分片价格和外部密钥标识符。

21种SMP武器列表

捆绑的SMP武器类别包括:

石中剑、灵魂收割者、雷霆狂怒、冰破者、龙弓、地狱之刃、水晶法杖、虚空锤、暗影匕首、风暴弓、泰坦斧、冰剑、凤凰弓、毒击、雷霆斧、光剑、地震者、风刃、熔岩法杖、天刃和死亡镰刀。

每个列表都可以将其显示图标映射到独立的外部武器标识符。

店铺配送操作

产品配送可以使用以下动作类型:

代码:
giveitem <id> [amount]
run_command <command>
smpcrates_givekey <id> [amount]
smpspawners_givespawner <id> [amount]
smpweapons_giveweapon <id> [amount]

Multiple alternatives can be placed in priority order:

Code:
smpweapons_giveweapon excalibur 1 ::OR:: run_command give %player% diamond_sword 1

The first currently available branch is selected.

Command templates support:

  • %player% — current username.
  • %uuid% — player UUID.
  • %product_id% — current shop product key.
  • %id% — action item or integration identifier.
  • %amount% — selected delivery amount.

Custom Item Registry

The included items.yml registry can define reusable products for giveitem delivery.

A registered item can configure:

  • Material.
  • Base amount.
  • Display name.
  • Lore.
  • Glow state.
  • Custom model data.
  • Spawner-type metadata.

The action amount acts as a multiplier. Large deliveries are split into legal Minecraft stack sizes and bounded to prevent unreasonable single-purchase output.

Example:

Code:
items:
  premium_token:
    material: AMETHYST_SHARD
    amount: 4
    name: "<gradient:#7c3aed:#d946ef><bold>Premium Token</bold></gradient>"
    lore:
      - "<gray>A configurable SMP Shards shop item."
    glow: true
    custom-model-data: 1001

Product delivery:

Code:
delivery: "giveitem premium_token 2"

This delivers two registry batches, for a total of eight configured items.

Purchase Safety Flow

The shop separates product resolution, balance deduction, player-owned item delivery, global command dispatch, and refund handling.

  1. Resolve a valid delivery branch — unavailable actions are ignored.
  2. Preflight direct-item capacity — require enough inventory storage for the complete item delivery.
  3. Check current shard balance — display both required and missing amounts when insufficient.
  4. Fire the shard loss event — allow integrations to cancel or modify the effective price.
  5. Debit the applied amount — only after validation succeeds.
  6. Deliver direct items on player ownership — inventory changes remain entity-safe.
  7. Dispatch commands on global ownership — console actions do not run from an arbitrary player thread.
  8. Refund known safe failures — scheduler rejection, unavailable required plugin, or command dispatch returning false can restore the debit.
  9. Surface unsafe partial states — partial item insertion or an external command exception is logged for staff review instead of pretending the transaction succeeded.

A console command that returns success but later fails internally inside another plugin cannot be automatically reversed. External command routes should be tested before public deployment.

Paginated Shard Leaderboard

Players can open a cached leaderboard showing the highest shard balances.

  • Player-head entries — each ranking uses the account owner's skull.
  • Formatted balances — leaderboard values use the configured number formatter.
  • 45 display positions per page — default GUI layout uses slots 0 through 44.
  • Previous and next controls — navigate large ranking sets.
  • Configurable title and navigation — edit the leaderboard YAML without recompiling.
  • Asynchronous SQL ordering — results are loaded outside player-owned execution.
  • Deterministic ordering — balance descending, then last known name ascending.
  • Cached rank map — player-rank placeholders do not query the database per request.
  • Configurable cache size — default 250 entries.
  • Configurable refresh period — default 1,200 seconds.

Default leaderboard configuration:

Code:
leaderboard:
  refresh-seconds: 1200
  cached-entries: 250

AFK Teleport System

The /shardafk command starts a configurable countdown before teleporting the player to the stored AFK destination.

  • Configurable countdown — default 5 seconds.
  • Movement threshold — default 0.15 blocks from the original location.
  • World-change cancellation — changing worlds during the countdown cancels it.
  • Duplicate countdown protection — a player cannot start a second active countdown.
  • Chat countdown — optional per-second messages.
  • Action-bar countdown — optional clean timer display.
  • Countdown sound — configurable per second.
  • Movement cancellation feedback — clears the action bar and reports the reason.
  • Asynchronous teleport — uses teleportAsync and reports success or failure.
  • Persistent destination — /shards setafk writes world, coordinates, yaw, and pitch.
  • Atomic location save — AFK updates use the YAML snapshot save path.

Default configuration:

Code:
countdown-seconds: 5
movement-threshold: 0.15
presentation:
  chat-countdown: true
  action-bar-countdown: true
location: {}

SQLite and MySQL Persistence

SMP Shards supports local SQLite and remote MySQL through HikariCP.

Database table:

Code:
CREATE TABLE smp_shards_accounts (
    uuid VARCHAR(36) PRIMARY KEY,
    last_name VARCHAR(16) NOT NULL,
    balance BIGINT NOT NULL DEFAULT 0
)

Indexes are created for:

  • balance — leaderboard ordering.
  • last_name — administrative username lookup.

Persistence behavior:

  • Asynchronous account loading — player joins do not execute JDBC directly on entity ownership.
  • Asynchronous name lookup — offline administrative account searches use the repository executor.
  • Prepared statements — account and leaderboard queries use parameterized SQL.
  • Database-native upsert — MySQL and SQLite use their appropriate conflict syntax.
  • Transactional batch saves — dirty account snapshots commit together.
  • Retryable dirty state — failed periodic flushes re-mark affected accounts as dirty.
  • Cached online accounts — normal balance reads do not query SQL.
  • Final full flush — shutdown attempts to save every cached account before closing the pool.

Default SQLite configuration:

Code:
persistence:
  flush-interval-seconds: 5
  type: SQLITE
  sqlite:
    file: shards.db

MySQL 配置:

代码:
persistence:
  type: MYSQL
  mysql:
    host: localhost
    port: 3306
    database: smp_shards
    username: root
    password: ""
    use-ssl: false
    maximum-pool-size: 10
    jdbc-url: ""

可以通过 jdbc-url 提供完整的自定义 JDBC URL。

占位API支持

占位API为可选。安装后,smpshards 扩展会自动注册,并在 PlaceholderAPI 重新加载时保持持久。

可用的占位符:

代码:
%smpshards_balance%
%smpshards_balance_raw%
%smpshards_balance_formatted%
%smpshards_currency_singular%
%smpshards_currency_plural%
%smpshards_accent_color%
%smpshards_in_generation_region%
%smpshards_generation_remaining_seconds%
%smpshards_generation_remaining_formatted%
%smpshards_generation_interval_seconds%
%smpshards_generation_base_amount%
%smpshards_generation_regions%
%smpshards_afk_countdown_active%
%smpshards_afk_countdown_remaining_seconds%
%smpshards_afk_location_set%
%smpshards_region_provider_mode%
%smpshards_shop_enabled%
%smpshards_leaderboard_position%
%smpshards_player_rank%
%smpshards_top_<rank>_name%
%smpshards_top_<rank>_balance%
%smpshards_top_<rank>_balance_formatted%

例如,将<rank>替换为正整数:

代码:
%smpshards_top_1_name%
%smpshards_top_1_balance_formatted%

玩家专用占位符使用缓存账户、地区、挂机和排行榜状态。它们不会对每个占位符请求都进行新的SQL查询。

公共 API 和事件

开发者可以通过 Bukkit 插件管理器获取启用的 SMPShardsPlugin 实例。主插件类直接实现了SMPShardsApi。

公共API揭示了:

  • 通过UUID缓存账户查询。
  • 按姓氏异步查询账户。
  • 缓存余额查询。
  • 异步排行榜查询。
  • 功能启用的查找功能。

包含两个Bukkit项目:

  • ShardGainEvent — 可取消且可变。
  • ShardLoseEvent — 可取消且可变。

Gain reasons:

Code:
REGION_GENERATION
KILL
ADMIN_GIVE
PAYMENT_RECEIVED
SHOP_PURCHASE
OTHER

Loss reasons:

Code:
SHOP_PURCHASE
PAYMENT_SENT
ADMIN_TAKE
OTHER

Listeners can cancel a transaction or replace the requested amount before the account mutation is applied. Event amounts are clamped to non-negative values.

MiniMessage and Branding

SMP Shards uses Adventure components for messages, titles, subtitles, action bars, and menu text.

  • MiniMessage gradients — create modern branded headings.
  • Hexadecimal colors — use exact brand colors.
  • Decorations — bold, italic, underline, and other MiniMessage styling.
  • Legacy ampersand colors — lines containing & can use legacy formatting.
  • Central prefix placeholder — reuse %prefix% across messages.
  • Currency placeholders — use %currency_singular% and %currency_plural%.
  • Custom accent tag — every <accent> tag resolves to the configured brand color.

Default brand color:

Code:
accent:
  color: '#d946ef'

Changing this value updates the custom <accent> tag used throughout messages and menus.

Configurable Sounds

Bundled sound keys include:

  • Generation reward.
  • Generation-zone entry.
  • UI click.
  • Error.
  • Purchase.
  • AFK countdown.
  • AFK teleport.
  • Kill reward.

每个声音可以配置:

代码:
sound: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.15

把声音设置为无以禁用它。无效音色名称会在每个键上报告一次,而不是反复刷到控制台。

配置文件SMP

碎片将主要系统拆分为重点文件:

代码:
plugins/SMPShards/
├── config.yml
├── generation.yml
├── afk.yml
├── branding.yml
├── integrations.yml
├── messages.yml
├── sounds.yml
├── shop.yml
├── items.yml
├── shards.db
├── Categories/
│   ├── blocks.yml
│   ├── resources.yml
│   ├── farming.yml
│   ├── weaponry.yml
│   ├── armory.yml
│   ├── tools.yml
│   ├── special.yml
│   ├── spawners.yml
│   ├── crates.yml
│   └── weapons.yml
└── Gui/
    └── Leaderboard.yml

档案职责:

  • config.yml——货币、功能切换、供应商、击杀奖励、排行榜、持久性和数字格式。
  • generation.yml——被动生成时机、奖金和呈现方式。
  • afk.yml — 挂机倒计时、移动阈值、展示和位置。
  • branding.yml — 自定义MiniMessage点缀颜色。
  • integrations.yml — 可选的命令交付插件名称和模板。
  • messages.yml — 所有面向用户的消息、标题、字幕和动作栏。
  • sounds.yml——声音名称、音量和音高。
  • shop.yml — 根菜单、分类按钮、导航和商店行为。
  • items.yml — 可重复使用的自定义项目定义。
  • 分类/*.yml — 分类页面和产品定义。
  • GUI/Leaderboard.yml——排行榜标题、位置、玩家条目和导航。

功能开关

每个主要游戏系统都可以独立启用或禁用:

代码:
features:
  afk-teleport: true
  shop: true
  leaderboard: true
  kill-rewards: true
  region-generation: true
  payments: true

禁用的系统会返回可配置的面向玩家的消息,而不是默默无动。

默认核心配置

代码:
currency:
  singular: "Shard"
  plural: "Shards"

features:
  afk-teleport: true
  shop: true
  leaderboard: true
  kill-rewards: true
  region-generation: true
  payments: true

region-provider:
  mode: AUTO
  generation-regions:
    - afk
    - afk_zone
  check-only-when-block-position-changes: true

kill-rewards:
  base-amount: 15
  prevent-consecutive-same-victim: true
  permission-bonuses:
    smpshards.kill.extra_ten: 10
    smpshards.kill.extra_twenty: 20

leaderboard:
  refresh-seconds: 1200
  cached-entries: 250

persistence:
  flush-interval-seconds: 5
  type: SQLITE
  sqlite:
    file: shards.db
  mysql:
    host: localhost
    port: 3306
    database: smp_shards
    username: root
    password: ""
    use-ssl: false
    maximum-pool-size: 10
    jdbc-url: ""

number-format:
  enabled: true
  decimals: 1
  suffixes: ["", "K", "M", "B", "T", "Q"]

安全的YAML默认更新

当捆绑的YAML文件获得新密钥时,SMP碎片可以将缺失的标量默认合并到现有磁盘文件中。

  • 现有的管理员值保持不变——现有的键不会被捆绑默认值取代。
  • 缺失的键入——更新可以添加新设置,而无需完全重置。
  • 临时文件准备——可变文件通过.tmp文件写入。
  • 可用时采用原子移动——降低部分写入风险。
  • 正常替换备份——适用于不支持原子移动的文件系统。
  • 路径验证——资源路径拒绝遍历和无效分隔符。

Reload Behavior

/shards reload 可以重新加载可配置的运行时状态,而无需完全重启服务器。

重新装填的系统包括:

  • 核心配置。
  • 生成设置。
  • AFK设置。
  • 品牌塑造。
  • 集成设置。
  • 留言。
  • 声音。
  • 购买根菜单。
  • 自定义物品登记。
  • 捆绑分类文件。
  • 排行榜图形界面。
  • 数字格式化器。
  • 区域提供者选择。
  • 当前在线玩家的世代区状态。

文件准备异步进行,提供者替换和玩家区域刷新则通过相应的全局和实体调度器进行。

Folia 支持

SMP 分片声明支持 Folia 并使用 Paper 的所有权感知调度器 API。

  • 全局区域调度器——重复调度、命令交付、提供商应用和控制台自有操作。
  • 玩家实体调度器——平衡事件、消息、库存交付、生成周期和玩家拥有状态。
  • 异步调度器——配置准备和延迟异步工作。
  • 专用JDBC执行器——账号加载、查询、保存和排行榜查询。
  • 异步传送API — AFK传送使用teleportAsync。
  • 调度器拒绝处理——当安全交付未开始时,支付和采购流程可以恢复借记。

该插件直接基于现代 Paper API 构建。它不是Bukkit/Spigot 1.8的旧插件。

命令

主命令别名:/smpshards、/shards 和 /shard。

  • /分片 — 显示发送者可用的玩家和管理员帮助热线。
  • /碎片平衡 — 显示你当前的碎片平衡。
  • /碎片巴尔——平衡的别名。
  • /碎片支付<玩家> <金额>——将碎片转移给其他在线玩家。
  • /碎片商店 — 开设碎片商店。
  • /碎片排行榜——打开第一个排行榜页面。
  • /碎片顶端——排行榜的别名。
  • /分片可以看到<player>——检查缓存或持久玩家的余额。
  • /碎片设置<player> <amount>——设置平衡,包括零。
  • /碎片给<玩家> <数量>——添加碎片。
  • /碎片取<玩家> <金额>——移除碎片时不允许透支。
  • /shards setafk — 将当前位置保存为挂机目的地。
  • /shards reload — 重新加载可配置的运行时内容。
  • /shardafk — 开始挂机传送倒计时。
  • /afk — AFK command alias.
  • /shardsafk — AFK command alias.

Tab completion includes main subcommands and online player names for payment and administrative target arguments.

Permissions

  • smpshards.use — use the main command and view help.
  • smpshards.pay — transfer shards to another player.
  • smpshards.shop — open the shop.
  • smpshards.leaderboard — open the leaderboard.
  • smpshards.afk — use the AFK teleport command.
  • smpshards.admin — parent administrative permission.
  • smpshards.admin.balance — inspect, set, give, and take balances.
  • smpshards.admin.setafk — save the AFK destination.
  • smpshards.admin.reload — reload plugin files.

Default configurable bonus permissions:

  • smpshards.generation.extra_two — default +2 generation bonus.
  • smpshards.generation.extra_three — default +3 generation bonus.
  • smpshards.kill.extra_ten — default +10 kill bonus.
  • smpshards.kill.extra_twenty — default +20 kill bonus.

Bonus permission nodes can be replaced or expanded through YAML.

Soft Dependencies and Integrations

SMP Shards starts without every optional integration installed.

  • WorldGuard — passive shard-generation region provider.
  • SMP Regions — ArkFlame region provider.
  • PlaceholderAPI — shard, rank, generation, AFK, and configuration placeholders.
  • SMP Crates — optional crate-key shop delivery.
  • SMP Spawners — optional spawner shop delivery.
  • SMP Weapons — optional custom-weapon shop delivery.

Region generation requires at least one selected and available region provider. The remaining economy, balance, payment, kill, AFK, database, and normal shop architecture can initialize without WorldGuard or SMP Regions.

Compatibility

  • Paper 1.21.4+ — primary supported platform.
  • Folia 1.21.4+ — fully supported platform.
  • Java 21 — required by the current build.
  • SQLite — bundled local persistence option.
  • MySQL — remote persistence option.
  • WorldGuard 7.x — optional provider integration.
  • PlaceholderAPI — optional expansion integration.
  • No mandatory Vault — shards remain an independent currency.
  • No mandatory database server — SQLite works locally.

SMP Shards uses modern Paper scheduler and teleport APIs. Bukkit, Spigot, Java 8, and Minecraft 1.8 are not supported by the attached 1.1.1 project.

Installation

  1. Install Java 21.
  2. Run Paper, Purpur, or Folia 1.21.4 or newer.
  3. Place SMPShards-1.1.1.jar inside the server's plugins directory.
  4. Install WorldGuard, SMP Regions, or both when using passive region generation.
  5. Optionally install PlaceholderAPI and supported ArkFlame ecosystem plugins.
  6. Start the server once to generate the configuration files.
  7. Set region-provider.generation-regions to existing region identifiers.
  8. Stand at the desired destination and execute /shards setafk.
  9. Edit generation rewards, kill rewards, shop prices, messages, sounds, and database settings.
  10. Restart the server or execute /shards reload.

Why Server Owners Choose SMP Shards

  • Clear progression loop — earn, save, spend, transfer, and compete with one currency.
  • Controlled reward zones — use existing region plugins rather than coordinate-only checks.
  • Rank monetization without uncontrolled stacking — highest permission bonus wins.
  • PvP incentives — reward kills while reducing basic same-victim farming.
  • Large configurable catalog — begin with 215 product definitions instead of an empty menu.
  • ArkFlame ecosystem potential — connect spawners, crates, and weapons through configurable commands.
  • No Vault requirement — preserve the server's primary economy while adding a progression token.
  • No mandatory MySQL setup — use SQLite immediately and migrate configuration to MySQL when needed.
  • Modern presentation — MiniMessage gradients, titles, action bars, player heads, and sounds.
  • Developer extensibility — read API, PlaceholderAPI, and mutable gain/loss events.
  • Folia-first ownership model — modern scheduler separation is built into the architecture.
  • Operational configuration split — edit the exact subsystem without navigating one enormous file.

Best Uses

  • Survival SMP — reward active or AFK progression with a dedicated shop currency.
  • Lifesteal SMP — attach shard rewards to PvP kills and valuable custom products.
  • Box SMP — create repeatable generation zones and high-volume resource progression.
  • Competitive SMP — combine kill rewards, ranks, leaderboards, and player trading.
  • Economy servers — run a premium token beside normal money.
  • Folia servers — use scheduler ownership designed for regionized execution.
  • ArkFlame networks — connect SMP Regions, SMP Spawners, SMP Crates, and SMP Weapons.
  • Seasonal servers — rebalance rewards and the complete product catalog between seasons.
  • AFK progression servers — move players through a controlled countdown into a configured generation area.
  • Ranked communities — assign permission-based generation and kill bonuses without inherited stacking.

常见问题

:SMP碎片能替代金库货币吗?
不。它提供独立的分币,不需要金库。

支持哪种服务器软件?
附带项目的目标是Paper、Purpur和Folia 1.21.4+。

需要哪个 Java 版本?
Java 21。

它支持Minecraft 1.8吗?
不。当前项目基于现代论文1.21.4 API构建。

玩家如何获得碎片?
通过配置的生成区域、玩家击杀、支付和行政奖励。

我可以禁用一种赚钱方式吗?
是的。区域生成、击杀奖励、付款、商店访问、排行榜访问和挂机传送都有功能切换。

我可以重新命名货币吗?
是的。config.yml配置单数和复数名称。

玩家可以在世界守卫队区域获得碎片吗?
是的。将WorldGuard的地区ID添加到region-provider.generation-regions。

它支持SMP区域吗?
是的。选择SMP_REGIONS或使用自动。

世界警卫队和SMP地区能协同工作吗?
是的。自动模式将所有可用供应商的比赛合并在一起。

权限奖励会叠加吗?
不。最高的匹配奖励会独立选择用于生成奖励和击杀奖励。

默认的生成奖励是什么?每15秒
获得一个碎片,之后才会有权限加成。

默认击杀奖励是什么?
十五碎片,许可加成。

它能防止杀戮刷怪吗?当同一杀手反复击败同一受害者时,
它能阻挡连续奖励。

玩家之间能互相付费吗?
是的。在线玩家使用 /shards 支付<player> <amount>。

付款交付失败时会发生什么?
当收款人信用被取消、拒绝或无法安排时,发送方的借记会被恢复。

有多少商店产品是捆绑的?
这些资源包含了215条产品定义,涵盖十个类别。

我可以编辑商店的价格和数量吗?
是的。每个产品都控制自己的价格、数量、页面、插槽、图标、名称、背景故事和配送。

我可以创建自定义分类吗?根商店
会将类别按钮映射到 YAML 文件。添加或替换已配置的分类文件以构建所需的目录。

产品能运行命令吗?
是的。使用run_command或其中一个专门的集成动作。

一个产品可以有备用交付吗?
是的。与 ::呃:R::; 的独立替代方案th使用第一可用分支。

店铺会防止库存满吗?
直接物品交付可以在余额借记前对玩家存储进行预检。

它会自动退款失败的购买吗?
已知的安全故障可以恢复借记卡。部分外部副作用会被报告供工作人员审核,而非盲目逆转。

它包含排行榜吗?
是的。排行榜使用玩家头衔、分页、缓存的SQL结果和可配置的图形界面内容。

PlaceholderAPI 每次都会查询数据库吗?
不。玩家平衡、排名和生成状态使用缓存的运行时数据。

它支持SQLite吗?
是的。SQLite是默认的持久化模式。

它支持MySQL(mySQL)吗?
是的。配置主机、端口、数据库、凭据、SSL、池大小或自定义JDBC网址。

数据库工作是异步运行的吗?
是的。账户加载、查询、保存和排行榜查询都使用专用执行器。

它支持挂机瞬移吗?
是的。该命令使用可配置的倒计时,当玩家超过阈值时取消。

我可以更改挂机目的地吗?
是的。站在目的地并执行/碎片setafk。

它支持MiniMessage吗?
是的。消息和菜单支持 MiniMessage,而旧有的&字串依然可用。

我可以更改全局的重音色吗?
是的。编辑branding.yml;自定义<重音>标签使用该值。

它会暴露API吗?
是的。Read API 可以暴露账户、余额、排行榜和功能状态。

其他插件能修改碎片奖励吗?
是的。ShardGainEvent 和 ShardLoseEvent 是可取消且可变的。

它支持Folia吗?
是的。该插件声明支持 Folia 并使用全局、播放器、异步和数据库执行边界。

世界警卫队和SMP地区是强制的吗?
只有被动区域生成需要一个可用的指定供应商。它们是软依赖。

占位API是强制的吗?
不。只有在启用 PlaceholderAPI 时,扩展才会注册。

SMP生成器、SMP箱子和SMP武器是必须的吗?
不。它们是各自商店类别的可选命令-交付集成。

赚取碎片。构建进度。奖励活动。控制经济。
安装SMP碎片,为玩家打造一个为Paper、Purpur和Folia SMP服务器打造的完整现代货币循环。

SEO关键词:SMP碎片、Minecraft碎片插件、分片货币插件、Minecraft代币经济、自定义货币插件、SMP经济插件、生存SMP货币、Lifesteal碎片插件、Box SMP碎片、PvP击杀奖励插件、AFK奖励插件、AFK区域奖励、WorldGuard货币区域、SMP区域集成、地区奖励插件、被动货币生成、玩家支付插件、碎片商店插件, Minecraft 商店货币、可配置 GUI 商店、215 产品商店、生成器商店集成、箱子钥匙商店集成、自定义武器商店、SQLite 经济插件、MySQL 经济插件、HikariCP Minecraft 插件、Folia 经济插件、Folia 碎片插件、Paper 1.21 插件、Purpur 1.21 插件、Minecraft 1.21.4 插件、Java 21 Minecraft 插件、PlaceholderAPI 碎片、碎片排行榜、玩家头部排行榜、MiniMessage 经济插件, 权限奖励奖励、反农场击杀奖励、ArkFlame Studios、SMP生成器集成、SMP箱子集成、SMP武器集成、SMP区域插件。

版本历史

查看全部版本 →
vv1.1.4
最新版本 · 2026-10-10 · 更新日志:初始版本
需先购买

评论

0

购买后可发表评论。

暂无评论

相关资源

你一定也喜欢下面这些资源。

查看全部 →
中文 English