[MD]
# TPA for TiMENU
> * 注意:
> 此文件依赖LLse插件TiMENU 1.1.0及以上版本
## 留言
这是一个组表单Demo, 向您展示TiMENU强大的功能, 你可以借鉴和改变该Demo, 去制作属于你的小功能!
## 使用教程
1. 下载此`tpa.json`文件
2. 将此文件复制/剪切到 你的BDS根目录/plugins/TiMENU/forms 文件夹
即可使用命令`/menu open tpa`或者使用点击事件跳转到tpa打开此文件
## 视频展示 (已转换成GIF)
[/MD]
[MD] ## 文件内容 ```json [ { "type": "diy", "op": "false", "title": "TPA for TiMENU", "items": [ { "type": "player_dropdown", "title": "选择一位在线玩家", "assign": "${topl}" }, { "type": "dropdown", "title": "类型", "show": [ "tpa - 传送到该玩家", "tphere - 该玩家传送到这里" ], "items": [ "2", "3" ], "default": 0, "assign": "${type}" } ], "send": { "type": "eval", "run": "topl = mc.getPlayer(topl);topl.runcmd(\"menu open tpa:\" + type + \" {\\\"topl\\\":\\\"\"+ player.name + \"\\\"}\");" } }, { "type": "modal", "op": "false", "title": "你有一个tpa请求", "content": "玩家 ${topl} 请求传送到你这里", "button1": { "title": "允许", "onClick": { "type": "cmd", "run": "tp ${topl} ${player.name}" } }, "button2": { "title": "拒绝", "onClick": { "type": "playerCmd", "run": "tell ${topl} §c我拒绝了你的tpa请求" } } }, { "type": "modal", "op": "false", "title": "你有一个tphere请求", "content": "玩家 ${topl} 请求你传送到TA那里", "button1": { "title": "允许", "onClick": { "type": "cmd", "run": "tp ${player.name} ${topl}" } }, "button2": { "title": "拒绝", "onClick": { "type": "playerCmd", "run": "tell ${topl} §c我拒绝了你的tphere请求" } } } ] ``` [/MD]
[MD] ## 文件内容 ```json [ { "type": "diy", "op": "false", "title": "TPA for TiMENU", "items": [ { "type": "player_dropdown", "title": "选择一位在线玩家", "assign": "${topl}" }, { "type": "dropdown", "title": "类型", "show": [ "tpa - 传送到该玩家", "tphere - 该玩家传送到这里" ], "items": [ "2", "3" ], "default": 0, "assign": "${type}" } ], "send": { "type": "eval", "run": "topl = mc.getPlayer(topl);topl.runcmd(\"menu open tpa:\" + type + \" {\\\"topl\\\":\\\"\"+ player.name + \"\\\"}\");" } }, { "type": "modal", "op": "false", "title": "你有一个tpa请求", "content": "玩家 ${topl} 请求传送到你这里", "button1": { "title": "允许", "onClick": { "type": "cmd", "run": "tp ${topl} ${player.name}" } }, "button2": { "title": "拒绝", "onClick": { "type": "playerCmd", "run": "tell ${topl} §c我拒绝了你的tpa请求" } } }, { "type": "modal", "op": "false", "title": "你有一个tphere请求", "content": "玩家 ${topl} 请求你传送到TA那里", "button1": { "title": "允许", "onClick": { "type": "cmd", "run": "tp ${player.name} ${topl}" } }, "button2": { "title": "拒绝", "onClick": { "type": "playerCmd", "run": "tell ${topl} §c我拒绝了你的tphere请求" } } } ] ``` [/MD]