Resource icon

Uncategorized Pneu Jai's BDS JS API 1.0.5

Source of resources
Original
Copyright link
#
Language
English
Supported version
  1. 1.16
前言
這是個沒啥用的前置插件,沒有直接用途,依賴BDSJSRunner
[LINE][/LINE]

用法
載入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
  • Like
Reactions: YanBing Online
Author
Pneu Jai
Downloads
692
Views
1,137
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Pneu Jai

Share this resource