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

左右菜单 ​

左右菜单(1.5.0+) ​

  • clickType
  • actions

clickType 表示这个按钮只能已指定方式点击才生效 actions 表示左右键对应执行的命令

yaml
  '1':
    index: 1
    name: 左键点击
    material: ARROW
    lore:
      - "&f- &7点击试试"
    isEnchant: false
    custom-model-data: 0
    hideFlag: true
    hideEnchant: true
    # 配置该按钮只能左键点击生效 left是左 right是右 middle是中
    clickType: left
    commands:
      - '[message] 你用了左键点击'
  '2':
    index: 2
    name: '左右键点击触发不同指令'
    material: APPLE
    lore:
      - "&f- &7左右键点击试试"
    isEnchant: false
    custom-model-data: 0
    hideFlag: true
    hideEnchant: true
    actions:
      left:
        - '[console] say 左键触发的命令'
      right:
        - '[console] say 右键触发的命令'
      middle:
        - '[console] say 中键触发的命令'