# open_requirement
# click_requirement
view_requirement:
# 设置需要满足的最低条件数量才能被视为成功。
# 默认值与条件数量相同。
minimumRequirement: <number>
# 条件列表,下面是每种类型的所有信息
requirements:
- type: permission
permission: "example.permission"
deny:
- type: message
messages:
- "&c你没有权限!"
- type: placeholder
placeholder: "%player_gamemode%" # 需要PAPI ecloud Player
value: "CREATIVE"
action: equals_string
# 特定拒绝操作
deny:
- type: message
messages:
- "&c你必须在创造模式下"
- type: regex
input: "%player_item_in_hand%" # 需要PAPI ecloud Player
regex: "(NETHERITE_|DIAMOND_|IRON_|GOLDEN_|STONE_|WOODEN_|LEATHER_|BOW|CROSSBOW|FISHING_ROD|SHEARS|SHIELD|TRIDENT|TURTLE_HELMET|ELYTRA|FLINT_AND_STEEL)"
deny:
- type: message
messages:
- "&c你手中没有物品!"
# 全局成功操作
success:
- type: sound
sound: ENTITY_PLAYER_LEVELUP
# 全局拒绝操作
deny:
- type: message
messages:
- "&c你手中没有物品。"
view_requirement:
deny:
- type: chat
messages:
- "嘿,我的名字是 %player%"
success:
- type: sound
sound: ENTITY_PLAYER_LEVELUP
requirements:
- type: permission
permission: "admin.use"
- type: placeholder
placeholder: "%player_is_flying%"
value: "yes"
action: equals_string
open_requirement:
requirements:
- type: regex
input: "%player_item_in_hand%"
regex: "(NETHERITE_|DIAMOND_|IRON_|GOLDEN_|STONE_|WOODEN_|LEATHER_|BOW|CROSSBOW|FISHING_ROD|SHEARS|SHIELD|TRIDENT|TURTLE_HELMET|ELYTRA|FLINT_AND_STEEL)"
deny:
- type: message
messages:
- "&c你手中没有物品。"
click_requirement:
left_click: # 你必须为你的条件指定一个名称,这个名称不会被使用。
clicks:
- LEFT
- SHIFT_LEFT
requirements:
- type: placeholder
placeholder: "%player_gamemode%"
value: "CREATIVE"
action: equals_string
deny:
- type: sound
sound: VILLAGER_NO
pitch: 0.5f
volume: 1.5f
success:
- type: message
messages:
- "&a左键点击!"
right_click: # 你必须为你的条件指定一个名称,这个名称不会被使用。
clicks:
- RIGHT
- SHIFT_RIGHT
requirements:
- type: placeholder
placeholder: "%player_gamemode%"
value: "CREATIVE"
action: equals_string
deny:
- type: sound
sound: VILLAGER_NO
pitch: 1.5f
volume: 0.5f
success:
- type: message
messages:
- "&a右键点击!"