QuickShop-Hikari-Dialog
一个 Paper 插件,使用对话框 UI 替换 QuickShop-Hikari 默认的商店交互界面。
依赖要求
| 依赖项 |
版本 |
| Java |
25 或更高 |
| Paper |
1.21.11 或更高 |
| QuickShop-Hikari |
6.2.0.11 或更高 |
可选依赖
MiniPlaceholders — 在翻译消息中启用受众(audience)和全局占位符标签。
安装
- 将插件 jar 文件放入服务器的
plugins/ 文件夹中。
- 确保 QuickShop-Hikari 已安装并在本插件之前加载。
- 启动服务器一次,以生成
plugins/QuickShop-Hikari-Dialog/config.conf 及默认翻译文件。
- 按照下文描述配置
plugins/QuickShop-Hikari/interaction.yml,然后重载或重启服务器。
QuickShop-Hikari: interaction.yml 设置
QuickShop-Hikari-Dialog 注册了三个行为标识符,必须在 QuickShop-Hikari 的 interaction.yml 中进行分配。
| 标识符 |
描述 |
SHOP_CREATE_DIALOG |
点击容器或墙上的告示牌时,打开创建新商店的对话框 |
SHOP_EDIT_DIALOG |
打开修改现有商店的对话框 |
TRADE_DIALOG |
打开从现有商店购买或向现有商店出售的对话框 |
推荐配置
# plugins/QuickShop-Hikari/interaction.yml
STANDING_LEFT_CLICK_SIGN: TRADE_DIALOG
STANDING_RIGHT_CLICK_SIGN: SHOP_EDIT_DIALOG
STANDING_LEFT_CLICK_SHOPBLOCK: TRADE_DIALOG
STANDING_RIGHT_CLICK_SHOPBLOCK: NONE # 保留用于打开箱子
STANDING_LEFT_CLICK_CONTAINER: SHOP_CREATE_DIALOG
STANDING_RIGHT_CLICK_CONTAINER: NONE
您可以根据服务器偏好自由地将这些标识符重新分配给其他点击操作。
权限
| 权限 |
描述 |
默认值 |
qshdialog.command.qshdialog.reload |
重载配置和翻译 |
OP |
qshdialog.command.shopdialog.create |
使用 /shopdialog create 命令 |
true |
qshdialog.command.shopdialog.edit |
使用 /shopdialog edit 命令 |
true |
qshdialog.command.tradedialog |
使用 /tradedialog 命令 |
true |
QuickShop-Hikari 自身的权限继续控制向每位玩家显示哪些对话框输入内容。
自定义占位符标签
以下标签可在翻译消息中使用。
(argument) = 可选
[argument] = 必填
商店占位符
适用于接收商店上下文(商店创建/编辑/交易对话框)的任何消息。
| 标签 |
描述 |
<shop:name> |
原始商店名称(若未设置则为空字符串) |
<shop:name_or:[fallback]> |
商店名称或任意备用名称 |
<shop:owner_name> |
所有者用户名 |
<shop:owner_balance> |
所有者当前余额(纯数字) |
<shop:owner_balance_formatted> |
所有者当前余额,由经济提供商格式化 |
<shop:price> |
商店价格(纯数字) |
<shop:price_formatted> |
商店价格,由经济提供商格式化 |
<shop:trade_type> |
本地化的交易类型标签 |
<shop:currency> |
货币标识符(若使用默认值则为空字符串) |
<shop:stock> |
当前库存数量,以交易单位计 |
<shop:space> |
可用容器空间,以交易单位计 |
<shop:display> |
true / false |
<shop:unlimited_stock> |
true / false |
<shop:product_id> |
商品的命名空间键(例如 minecraft:diamond) |
<shop:product_name> |
商品的 item_name 组件 |
<shop:product_display_name> |
商品的有效显示名称 |
玩家占位符
适用于接收受众(即几乎所有消息)的所有消息。
| 标签 |
描述 |
<player_name> |
玩家名称 |
<player_display_name> |
玩家显示名称 |
<player_balance> |
玩家当前余额 |
<player_balance_formatted> |
玩家当前余额,由经济提供商格式化 |
商店数量
| 标签 |
描述 |
<shop_count:[player]> |
玩家当前拥有的商店数量 |
<shop_count_max:[player]> |
玩家的商店上限(若禁用限制则为 -1) |
商店费用
| 标签 |
描述 |
<shop_fee:create:(player)> |
创建商店的费用 |
<shop_fee:create_formatted:(player)> |
创建商店的费用,由经济提供商格式化后的显示文本 |
<shop_fee:change_name:(player)> |
重命名商店的费用 |
<shop_fee:change_name_formatted:(player)> |
重命名商店的费用,由经济提供商格式化后的显示文本 |
<shop_fee:change_price:(player)> |
修改商店价格的费用 |
<shop_fee:change_price_formatted:(player)> |
修改商店价格的费用,由经济提供商格式化后的显示文本 |
价格占位符
| 标签 |
描述 |
<price:[item_id]:min> |
指定物品允许的最低价格 |
<price:[item_id]:max> |
指定物品允许的最高价格 |
[item_id] 是带命名空间的物品键,例如 minecraft:diamond。其他标签可以嵌套在参数中,例如:
qsh_dialog.shop.create.dialog.input.price=价格 (范围: <price:'<shop_product_id>':min> - <price:'<shop_product_id>':max>)
<quickshop:key> / <quickshop:key:arg0:arg1>
通过其翻译键渲染 QuickShop-Hikari 消息,并可选地传入参数。
每个参数都按 MiniMessage 格式解析,因此可以嵌套其他标签:
qsh_dialog.trade.purchase.fail.shop_out_of_stock=<quickshop:shop-stock-too-low:'<shop_stock>':'<shop_product_display_name>'>
QuickShop-Hikari-Dialog
A Paper plugin that replaces QuickShop-Hikari's default shop interactions with dialog UIs.
Requirements
| Dependency |
Version |
| Java |
25 or later |
| Paper |
1.21.11 or later |
| QuickShop-Hikari |
6.2.0.11 or later |
Optional dependencies
MiniPlaceholders — Enables audience and global placeholder tags inside translation messages.
Installation
- Place plugin jar in your server's
plugins/ folder.
- Ensure QuickShop-Hikari is installed and loaded before this
plugin.
- Start the server once to generate
plugins/QuickShop-Hikari-Dialog/config.conf and the default translation files.
- Configure
plugins/QuickShop-Hikari/interaction.yml as described below, then reload or restart.
QuickShop-Hikari: interaction.yml Setup
QuickShop-Hikari-Dialog registers three behavior identifiers that must be assigned in QuickShop-Hikari's
interaction.yml.
| Identifier |
Description |
SHOP_CREATE_DIALOG |
Opens a dialog to create a new shop by clicking a container or wall sign |
SHOP_EDIT_DIALOG |
Opens a dialog to modify an existing shop |
TRADE_DIALOG |
Opens a dialog to buy from or sell to an existing shop |
Recommended configuration
# plugins/QuickShop-Hikari/interaction.yml
STANDING_LEFT_CLICK_SIGN: TRADE_DIALOG
STANDING_RIGHT_CLICK_SIGN: SHOP_EDIT_DIALOG
STANDING_LEFT_CLICK_SHOPBLOCK: TRADE_DIALOG
STANDING_RIGHT_CLICK_SHOPBLOCK: NONE # reserved for opening the chest
STANDING_LEFT_CLICK_CONTAINER: SHOP_CREATE_DIALOG
STANDING_RIGHT_CLICK_CONTAINER: NONE
You may freely reassign these identifiers to other click actions depending on your server's preferences.
Permissions
| Permission |
Description |
Default |
qshdialog.command.qshdialog.reload |
Reload config and translations |
OP |
qshdialog.command.shopdialog.create |
Use the /shopdialog create command |
true |
qshdialog.command.shopdialog.edit |
Use the /shopdialog edit command |
true |
qshdialog.command.tradedialog |
Use the /tradedialog command |
true |
QuickShop-Hikari's own permissions continue to control which dialog inputs are shown to each player.
Custom Placeholder Tags
The following tags are available inside translation messages.
(argument) = Optional
[argument] = Required
Shop placeholders
Available in any message that receives a Shop context (shop create/edit/trade dialogs).
| Tag |
Description |
<shop:name> |
Raw shop name (empty string if unset) |
<shop:name_or:[fallback]> |
Shop name or any name |
<shop:owner_name> |
Owner's username |
<shop:owner_balance> |
Owner's current balance (plain number) |
<shop:owner_balance_formatted> |
Owner's current balance, formatted by the economy provider |
<shop:price> |
Shop price (plain number) |
<shop:price_formatted> |
Shop price, formatted by the economy provider |
<shop:trade_type> |
Localised trade type label |
<shop:currency> |
Currency identifier (empty string if using default) |
<shop:stock> |
Current stock count, in trade units |
<shop:space> |
Available container space, in trade units |
<shop:display> |
true / false |
<shop:unlimited_stock> |
true / false |
<shop:product_id> |
Product's namespaced key (e.g. minecraft:diamond) |
<shop:product_name> |
Product's item_name component |
<shop:product_display_name> |
Product's effective display name |
Player placeholders
Available in all messages that receive an audience (i.e. virtually every message).
| Tag |
Description |
<player_name> |
Player's name |
<player_display_name> |
Player's display name |
<player_balance> |
Player's current balance |
<player_balance_formatted> |
Player's current balance, formatted by the economy provider |
Shop count
| Tag |
Description |
<shop_count:[player]> |
Number of shops the player currently owns |
<shop_count_max:[player]> |
Player's shop limit (-1 if limits are disabled) |
Shop fee
| Tag |
Description |
<shop_fee:create:(player)> |
Cost to create a shop |
<shop_fee:create_formatted:(player)> |
Cost to create a shop, formatted by the economy provider |
<shop_fee:change_name:(player)> |
Cost to rename a shop |
<shop_fee:change_name_formatted:(player)> |
Cost to rename a shop, formatted by the economy provider |
<shop_fee:change_price:(player)> |
Cost to change a shop's price |
<shop_fee:change_price_formatted:(player)> |
Cost to change a shop's price, formatted by the economy provider |
Price placeholders
| Tag |
Description |
<price:[item_id]:min> |
Minimum allowed price for the given item |
<price:[item_id]:max> |
Maximum allowed price for the given item |
[item_id] is a namespaced item key such as minecraft:diamond. Other tags can be nested inside the argument, for example:
qsh_dialog.shop.create.dialog.input.price=Price (Range: <price:'<shop_product_id>':min> - <price:'<shop_product_id>':max>)
<quickshop:key> / <quickshop:key:arg0:arg1>
Renders a QuickShop-Hikari message by its translation key, with optional arguments.
Each argument is parsed as MiniMessage, so other tags can be nested:
qsh_dialog.trade.purchase.fail.shop_out_of_stock=<quickshop:shop-stock-too-low:'<shop_stock>':'<shop_product_display_name>'>
评论 0
登录后参与评分
还没有评论,来抢沙发吧