V Shards

插件

· 作者 ReakZ

V-Shards - 添加了一种名为 Shards 的自定义游戏内货币,玩家可以赚取、花费和交易这种货币。

0 本站下载 0 关注 更新于 6 个月前

最新 1.1.0 · 26.1.2 · Bukkit / Paper

一键开服(送7天)

? V-Shards

适用于 Paper 1.21.1+ 服务器的简单垂直交通方案


✨ 功能特性

  • ? 基于 UUID 的经济系统 — 余额在玩家改名后依然保留
  • ? GUI 商店系统 — 完全可定制的购买/出售界面
  • ? PlaceholderAPI 支持 — 可在任意位置显示余额
  • ? 排行榜 — 持有最多碎片的玩家排名,支持分页显示
  • ⚡ 零延迟设计 — 脏数据追踪仅保存修改过的数据
  • ? MiniMessage 格式化 — 现代色彩渐变与样式支持
  • ? 安全锁定 — 锁定的 GUI 防止物品被非法操作
  • ⬆️ 自动保存 — 可配置保存间隔(默认:5 分钟)

? 安装方法

  1. 下载 V-Shards.jar
  2. 放入 plugins/ 文件夹
  3. 重启服务器
  4. 编辑 plugins/V-Shards/config.yml 进行自定义配置

PlaceholderAPI

占位符 返回值
%vshards_amount% 请求玩家的碎片余额
%vshards_amount_<player>% 指定玩家的碎片余额

余额使用与游戏内相同的 K / M / B 缩写系统进行格式化(例如 10K、2.5M、1B)。


数字格式化

所有命令、消息和占位符中的余额及价格值均会自动缩写:

原始数值 显示为
500 500
1,000 1K
10,000 10K
10,500 10.5K
1,000,000 1M
2,500,000 2.5M
1,000,000,000 1B

整数不会显示小数点(例如 10K 而非 10.0K)。仅当小数有意义时才会显示(例如 10.5K)。


⌨️ 命令

命令 权限节点 描述
/shards vshards.balance 查看你的余额
/shards <player> vshards.balance.others 查看其他玩家的余额
/shards pay <player> <amount> vshards.pay 向其他玩家发送碎片
/shards give <player> <amount> vshards.admin.give 给予玩家碎片
/shards take <player> <amount> vshards.admin.take 移除玩家的碎片
/shards set <player> <amount> vshards.admin.set 设置精确的余额
/shards top [page] vshards.top 查看排行榜
/shards shop vshards.shop 打开商店 GUI
/shards reload vshards.admin.reload 重新加载所有配置文件

别名: /shard


? 权限节点

权限节点 默认状态 描述
vshards.balance 所有人 查看自己的余额
vshards.pay 所有人 向其他玩家发送碎片
vshards.top 所有人 查看排行榜
vshards.shop 所有人 访问商店 GUI
vshards.balance.others OP (管理员) 查看其他人的余额
vshards.admin.* OP (管理员) 所有管理命令

?️ shop.yml #预览

定义 GUI 布局和所有商店物品。通过 /shards reload 重载 —— 无需重启服务器。

⚙️ shop.yml
# =============================================
#         V-Shards - 商店配置
# =============================================
# 支持 display_name、lore 和 menu_title 中的 & 颜色代码及旧版颜色代码。
#
# 物品类型:
#   buy        扣除碎片,然后给予物品或执行命令
#   sell       收取物品,然后给予碎片
#   close      关闭 GUI
#   decoration 非交互式填充物品
#
# 槽位格式:
#   slot: 13
#   slot: 0, 1, 2, 3, 4, 5
#   slot: [0, 1, 2, 3, 4, 5]
#
# 可选的命令字段:
#   command-console: 以 CONSOLE 身份运行,支持 %player%
#   command-player:  以 PLAYER 身份运行
#   如果定义了命令,则不给予/收取物品 —— 由命令处理操作。
#   使用命令时将 amount 设置为 0。
# =============================================

menu_title: '&dꜱʜᴀʀᴅꜱ ꜱʜᴏᴘ'
size: 27

items:

# 顶部装饰边框
border:
  material: GRAY_STAINED_GLASS_PANE
  slot: 18, 19, 20, 21, 22, 23, 24, 25, 26
  type: decoration
  display_name: '&r'
  lore: []

# 商店物品
pig_spawner_buy:
  material: SPAWNER
  slot: 0
  type: buy
  price: 5000
  amount: 1
  display_name: '&d&lᴘɪɢ ꜱᴘᴀᴡɴᴇʀ'
  lore:
    - '&8                    '
    - '&l&8| &f1x ᴘɪɢ ꜱᴘᴀᴡɴᴇʀ'
    - '&l&8| &7ᴄᴏꜱᴛ: &d5,000 ꜱʜᴀʀᴅꜱ'
    - '&8                    '
    - '&l&8| &7ᴄʟɪᴄᴋ ᴛᴏ ʙᴜʏ!'

pig_spawner_sell:
  material: SPAWNER
  slot: 1
  type: sell
  price: 2500
  amount: 1
  display_name: '&c&lꜱᴇʟʟ ᴘɪɢ ꜱᴘᴀᴡɴᴇʀ'
  lore:
    - '&8                    '
    - '&l&8| &f1x ᴘɪɢ ꜱᴘᴀᴡɴᴇʀ'
    - '&l&8| &7ᴇᴀʀɴ: &62,500 ꜱʜᴀʀᴅꜱ'
    - '&8                    '
    - '&l&8| &7ᴄʟɪᴄᴋ ᴛᴏ ꜱᴇʟʟ!'

diamond_buy:
  material: DIAMOND
  slot: 2
  type: buy
  price: 300
  amount: 1
  display_name: '&b&lᴅɪᴀᴍᴏɴᴅ'
  lore:
    - '&8                    '
    - '&l&8| &f1x ᴅɪᴀᴍᴏɴᴅ'
    - '&l&8| &7ᴄᴏꜱᴛ: &b300 ꜱʜᴀʀᴅꜱ'
    - '&8                    '
    - '&l&8| &7ᴄʟɪᴄᴋ ᴛᴏ ʙᴜʏ!'

diamond_sell:
  material: DIAMOND
  slot: 3
  type: sell
  price: 150
  amount: 1
  display_name: '&c&lꜱᴇʟʟ ᴅɪᴀᴍᴏɴᴅ'
  lore:
    - '&8                    '
    - '&l&8| &f1x ᴅɪᴀᴍᴏɴᴅ'
    - '&l&8| &7ᴇᴀʀɴ: &6150 ꜱʜᴀʀᴅꜱ'
    - '&8                    '
    - '&l&8| &7ᴄʟɪᴄᴋ ᴛᴏ ꜱᴇʟʟ!'

# ── 基于命令的购买示例(不给予物品 —— 由命令处理) ────────────
# vip_rank:
#   material: NETHER_STAR
#   slot: 16
#   type: buy
#   price: 50000
#   amount: 0
#   command-console:
#     - 'lp user %player% parent set vip'
#   command-player:
#     - 'me just bought VIP!'
#   display_name: '&6&lᴠɪᴘ ʀᴀɴᴋ'
#   lore:
#     - '&8                    '
#     - '&l&8| &7ᴄᴏꜱᴛ: &650,000 ꜱʜᴀʀᴅꜱ'
#     - '&8                    '
#     - '&l&8| &7ᴄʟɪᴄᴋ ᴛᴏ ʙᴜʏ!'

# ── 底部栏 ─────────────────────────────────────────────────────────────
close:
  material: RED_STAINED_GLASS_PANE
  slot: 22
  type: close
  display_name: '&c&l关闭'
  lore:
    - '&7点击以关闭。'

?️ 物品字段参考

字段 必需 备注
material ✅ 任何有效的 Bukkit Material 名称(例如 DIAMOND、SPAWNER)
slot ✅ 背包槽位索引,范围 0 到 size - 1
type ✅ buy、sell、close 或 decoration
price buy / sell 扣除的碎片数(购买)或奖励的碎片数(出售)
amount buy / sell 给予/取走的物品数量。与 command-console / command-player 配合使用时请使用 0
command-console 可选 作为控制台执行的命令列表。支持 %player%
command-player 可选 作为玩家执行的命令列表。支持 %player%
display_name ✅ 支持 & 颜色代码
lore 可选 描述行列表。支持 & 颜色代码

提示: 槽位索引从 0 开始。对于拥有 54 个槽位(6 行)的背包,有效槽位为 0–53。两个物品若共享同一个槽位,其中一个会静默覆盖另一个。


你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源