🎉 [精灵]CompanionsPlus v3.0.0 版本已发布 ✨ 点击查看
Skip to content

变量菜单 ​

菜单如何根据变量判断是否可点击 ​

  • 主要节点

conditions
conditionNotMet 1.7.1+ conditionsHide 满足条件按钮才显示 用法跟conditions一致 1.9.2+

yaml
  'conditions':
    index: 29
    name: '   &8[&c变量条件&8]'
    material: ARROW
    lore:
      - "&f- &7变量条件支持6种符号"
      - "&f- &7 = ; !=; >; <; >=; <="
      - "&f- &7 = ; !=; 无限制"
      - "&f- &7>; <; >=; <= 必须为数字"
      - "&f- &7玩家名称: &a%player_name%"
    isEnchant: false
    custom-model-data: 0
    # 自定义条件
    conditions:
      - '%player_name% = 米饭'
      - '%player_money% > 100'
    # 自定义点击条件未满足提醒
    conditionNotMet: "未满足条件,原因:不是米饭"
    commands:
      - '[message] say 你点击了该按钮'