CommandPanels Wiki
  • CommandPanels Wiki
  • FAQ
  • 视频
  • 配置文件
  • 命令权限
  • Placeholder 一览
  • 开发者 API
  • 面板编辑
    • 面板设置
    • 面板命令
    • 物件设置
    • Has 节
  • 执行命令
    • 命令标签
    • 命令序列
  • 依赖
  • 玩家输入
  • 面板变量
  • 生成面板
  • 多个面板
  • 快捷栏物件
  • 动画 +
  • 面板方块
  • 旗帜与地图
Powered by GitBook
On this page
  1. 执行命令

命令序列

如何为命令使用序列。

如何使用 sequence= [位置] 序列标签

序列标签只是用于以 YAML 文件的形式将同样的命令置于不同的地方,实现命令复用。下面是一个例子。 通过使用 sendMessage ,将在文件中检查该位置是否有文件中的列表。一旦找到,无论序列在哪里,都将把命令插入该物件的命令中。

panels:
  adminPanel:
    perm: default
    rows: 5
    title: '&6&l管理面板'
    commands:
    - mod
    empty: 'Black_Stained_glass_pane'
    sendMessage:
    - commandpanels:commandpanelclose
    - console= title %cp-player-name% times 20 60 20
    - console= title %cp-player-name% subtitle {"text":"已被惩罚","color":"green"}
    - console= title %cp-player-name% title {"text":"%cp-player-input%"}
    item:
      '22':
        material: COMPASS
        name: '&b封禁'
        commands:
        - 'console= ban %cp-player-input%'
        - 'sequence= sendMessage'
      '20':
        material: BOOK
        name: '&4踢出'
        commands:
        - 'console= kick %cp-player-input%'
        - 'sequence= sendMessage'
      '24':
        material: orange_dye
        name: '&6警告'
        commands:
        - 'console= warn %cp-player-input%'
        - 'sequence= sendMessage'
Previous命令标签Next依赖

Last updated 2 years ago

Porkchop_64 已被惩罚