Mc_chuan
  '1':
    update: [25, 20, -1, -1]
    display:
      material: blue Stained Glass Pane
      name: ['&c&ltp传送',]
    actions:
      left:
        actions:
        - 'command: tpa'
    catcher:
        target:
         type: SING
         before: 'tell: 请输入一名玩家的名称'
         cancel: 'tell: 已取消捕获器'
          reactions:
            - condition: 'isOnline.${input_target}'
              execute: 'tell: 名称确认. ${input_target}'
          deny:
            - 'tell: 抱歉, 但玩家 ${input_target} 不在线'
            - 'return'
#麻烦哪个大佬帮我修改成正确格式 使得正常使用 点击后 输入玩家ID 后 自动 执行tpa



MrXiaoM
我没用过 TrMenu (因为 DeluxeMenus 配合 CommandPrompt 对我来说够用了)

但是凭我的经验我觉得是将
  1. execute: 'tell: 名称确认. ${input_target}'
复制代码

改成
  1. execute: 'commands: tpa ${input_target}'
复制代码


试试看吧

傻狐狐
本帖最后由 傻狐狐 于 2021-8-18 02:21 编辑

  '1':
    update: [25, 20, -1, -1]
    display:
      material: blue Stained Glass Pane
      name: ['&c<p传送',]
    actions:
      all:
       - catcher:

           target:
             type: SING
              before: 'tell: 请输入一名玩家的名称'
              cancel: 'tell: 已取消捕获器'
              reactions:
                - condition: 'isOnline.${input_target}'
                 execute:
                   - 'tell: 名称确认. ${input_target}'
                   - 'command: tpa ${input_target}'
                 deny:
                    - 'tell: 抱歉, 但玩家 ${input_target} 不在线'
                   - 'return'

Mc_chuan
傻狐狐 发表于 2021-8-18 02:11
'1':
    update: [25, 20, -1, -1]
    display:

不对。。。

Mc_chuan
bilibili_Xiao_M 发表于 2021-8-18 02:07
我没用过 TrMenu (因为 DeluxeMenus 配合 CommandPrompt 对我来说够用了)

但是凭我的经验我觉得是将

现在主要是那个格式都对不上 后面的都不识别

Mc_chuan
傻狐狐 发表于 2021-8-18 02:11
'1':
    update: [25, 20, -1, -1]
    display:

你这直接wink复制给我的吧、、、

MrXiaoM
本帖最后由 bilibili_Xiao_M 于 2021-8-18 02:35 编辑
Mc_chuan 发表于 2021-8-18 02:14
现在主要是那个格式都对不上 后面的都不识别

我发现了个盲点,你发上来的配置的缩进是不正确的
明明'1'到update是2格缩进
catcher到target又变成了四格缩进
target到type又变成了1格缩进,到 reactions 又变成了2格缩进
建议先去复习下 yaml 语法
由于我暂时找不到v2的帮助文档,可能帮不了你写菜单
我找到v2的帮助文档了,改好后的配置如下,试试吧这个是让玩家打开聊天框的,如果想要和原来的配置一样用木牌,就把 type: CHAT 的 CHAT 改成 SIGN

  1.   '1':
  2.     update: [25, 20, -1, -1]
  3.     display:
  4.       material: blue Stained Glass Pane
  5.       name: ['&c&ltp传送',]
  6.     actions:
  7.       left:
  8.         actions:
  9.         - 'command: tpa'
  10.     catcher:
  11.       target:
  12.         type: CHAT
  13.         before: 'tell: 请输入你要TP玩家的名称'
  14.         cancel: 'tell: 已取消输入'
  15.         reactions:
  16.           - condition: 'isOnline.${input_target}'
  17.             execute: 'command: tpa ${input_target}'
  18.             deny:
  19.             - 'tell: 错误: 玩家 ${input_target} 不在线 (或不存在)'
  20.             - 'return'
复制代码





第一页 上一页 下一页 最后一页