呃这是一款简单的API
允许你在Skript中调用Floodgate的Api
(并且可以取代Floodgate-Skript, 无需BEMenuAPI)
**安装方法**
装上依赖插件后
将该脚本放入plugins/Skript/scripts即可
先来几个示范
更多语法可查阅wiki或源码
允许你在Skript中调用Floodgate的Api
(并且可以取代Floodgate-Skript, 无需BEMenuAPI)
**安装方法**
装上依赖插件后
将该脚本放入plugins/Skript/scripts即可
先来几个示范
# 进入信息
on join:
if player is from floodgate:
send "你是基岩版玩家"
send "你当前使用的UI是%ui profile of player%"
#命令表单
command /form:
trigger:
if player is from floodgate:
sendCommandForm(player)
function sendCommandForm(p: player):
set {_form} to simple form with title "菜单"
add button display "Shop" to form {_form}
add button display "Spawn" to form {_form}
create section with {_proxy}, {_f}, {_data} stored in {_handler}:
set {_response} to parse response {_data} by {_f}
if response {_response} is correct:
if clicked button id of {_response} is 0: # id从0开始
make {_p} execute command "shop" # 执行命令
else if clicked button id of {_response} is 1:
make {_p} execute command "spawn" # 同上
set response handler of {_form} to section handler {_handler} # 这一步等于API中的Form.responseHandler(...)
send form {_form} to {_p} # 发送
更多语法可查阅wiki或源码