主题
奖励配置
QueDP 提供两种奖励配置文件:rewards.yml(直接发放奖励)和 chest_rewards.yml(箱子UI选择奖励)。
rewards.yml
普通奖励
yaml
rewards:
通关奖励:
items:
- type: item
id: DIAMOND
amount: 5
- type: mythic_item # MythicMobs 物品
id: legendary_sword
amount: 1
money: 1000 # 需要 Vault
exp: 500
commands:
- "give {player_name} golden_apple 3"随机奖励
yaml
rewards:
随机宝箱:
type: random
options:
普通:
weight: 70
items:
- type: item
id: IRON_INGOT
amount: 10
稀有:
weight: 25
items:
- type: item
id: DIAMOND
amount: 3
传说:
weight: 5
items:
- type: mythic_item
id: epic_weapon
amount: 1
money: 5000物品类型
| 类型 | 说明 |
|---|---|
item / minecraft | 原版 Minecraft 物品(Material 名称) |
mythic_item / mm_item | MythicMobs 自定义物品 |
chest_rewards.yml
箱子奖励以 GUI 界面的形式让玩家选择奖励。
yaml
chests:
普通宝箱:
title: "&6&l✦ 普通宝箱 ✦"
rows: 3 # GUI 行数(1-6)
mode: single # single = 只能选一个
background: BLACK_STAINED_GLASS_PANE # 背景填充材质(可选)
options:
- slot: 11
icon: DIAMOND
name: "&b钻石奖励"
lore:
- "&7获得 5 颗钻石"
reward: 钻石奖励 # 关联 rewards.yml 中的奖励名
- slot: 13
icon: GOLD_INGOT
name: "&6金币奖励"
lore:
- "&7获得 1000 金币"
reward: 金币奖励
- slot: 15
icon: EXPERIENCE_BOTTLE
name: "&a经验奖励"
lore:
- "&7获得 500 经验"
reward: 经验奖励箱子模式
| 模式 | 说明 |
|---|---|
single | 只能选择一个选项 |
multiple | 可以选择多个 |
all | 获得所有选项 |
提示
箱子选项中的 reward 字段关联到 rewards.yml 中定义的奖励名称。需要先在 rewards.yml 中配置好对应的奖励。
