资源图标

JS插件 Pneu Jai's BDS JS API 1.0.5

登录后下载
资源类型
原创
版权链接
#
依赖
BDSJSRunner
语言
English
支持版本
1.16
前言
這是個沒啥用的前置插件,沒有直接用途,依賴BDSJSRunner


用法
載入API
runScript(getShareData("loadPneuAPI"))
API接口定義 (INCOMPLETE DUE TO THE MAXIMUM CHARACTER COUNT OF 10k)

函数描述參數返回值例子
/atob轉換base64碼至字符串字符串: encodedString轉換完的字符串
JavaScript:
let str = atob("JUU0JUJEJUEwJUU1JUE1JUJEJTIwanM=");
/bota轉換字符串至base64碼字符串: string轉換完的base64碼
JavaScript:
let encodedStr = btoa("你好 js");
/generateId使用當前時間生成ID/生成的ID
JavaScript:
let id = generateId();
/setInterval定時執行一條指令字符串/函数: code, 整型: millisec/
JavaScript:
setInterval(function() {
log("你好 js");
}, 1000);
JSON
(static)
escapeAndParse轉換帶留言和隔行的字符串至JSON字符串: text, 函数: ?reviver轉換完的JSON
JavaScript:
let json = JSON.escapeAndParse(`{
//留言
"你好": "j
s"
}`);
Objectserialize轉換物件至單行字符串/轉換完的單行字符串
JavaScript:
let obj = {"你好": "js"};
let str = obj.serialize()
}`);
Command/解析指令字符串字符串: ?command解析完的指令和參數
JavaScript:
let {args, method, raw} = new Command("/me 你好 js ");
Command (static)registerCommand字符串: method, 函数: action, 整型 : ?requiredPermissionLevel, 字符串: ?description
Command (static)registerAlias字符串: alias, 字符串: originalMethod
Command
(static)
setCommandRequiredPermissionLevel(only supports increasing permission level for vanilla commands)
SimpleForm/字符串: ?title, 字符串: ?content, 數組: ?buttons
SimpleFormtoString/
SimpleFormsendToPlayer
SimpleFormsetTitle
SimpleFormgetTitle
SimpleFormsetContent
SimpleFormgetContent
SimpleFormaddButton
ModalForm/
ModalFormtoString
ModalFormsendToPlayer
ModalFormsetTitle
ModalFormgetTitle
ModalFormsetContent
ModalFormgetContent
ModalFormsetButton1
ModalFormgetButton1
ModalFormsetButton2
ModalFormgetButton2
CustomForm/
CustomFormtoString
CustomFormsendToPlayer
CustomFormsetTitle
CustomFormgetTitle
CustomFormaddContent
CustomFormaddLabel
CustomFormaddToggle
CustomFormaddSlider
CustomFormaddStepSlider
CustomFormaddDropdown
CustomFormaddInput
NBT
(static)
createTag
NBT (static)parseFromJSON
NBT (static)parseFromNBTString
ByteTag/
ByteTaggetName
ByteTagsetName
ByteTaggetValue
ByteTagsetValue
ByteTaggetType
ByteTagtoString
ByteTagparseToJSON
...
Player/
Player (static)getPlayernameByUUID
Player (static)getPlayernameByXUID
Player (static)getUUIDByPlayername
Player (static)getUUIDByXUID
Player (static)getXUIDByPlayername
Player (static)getXUIDByUUID
PlayergetAbility
PlayersetAbility
PlayergetAttribute
PlayersetAttribute
PlayergetMaxAttribute
PlayersetMaxAttribute
PlayergetDimension
PlayergetPosition
PlayergetDisplayPosition
PlayergetDisplayName
PlayersetDisplayName
PlayergetOriginalName
ABLE]
備註 Typing > before javascript in the server console runs the script
  • 喜欢
反馈: YanBing Online
作者
Pneu Jai
下载
29
阅读
335
首次发布
最后更新
评分
0.00 星 0 次评分

Pneu Jai的更多资源