feat: add fakelist api

This commit is contained in:
Tsubasa6848
2024-05-20 01:03:44 +08:00
Unverified
parent de325c0a1e
commit 10b8ab5b7f
2 changed files with 18 additions and 4 deletions
+2 -3
View File
@@ -5,6 +5,5 @@ Legacy RemoteCall API for GMLIB. Only for legacy LSE plugin compatibility.
- 本模块是 `GMLIB``Legacy RemoteCall API` 模块,是为LL2的LLSE插件的兼容性保留。 - 本模块是 `GMLIB``Legacy RemoteCall API` 模块,是为LL2的LLSE插件的兼容性保留。
- 通过本模块,可以使LSE插件调用 `GMLIB` 内部的API。 - 通过本模块,可以使LSE插件调用 `GMLIB` 内部的API。
# 注意事项 # 开发文档
- 本模块仅为兼容性保留模块,仅保留过去的接口以保留兼容性。 - https://groupmountain.github.io/Documentation/
- 本模块不会提供 `GMLIB` 在迁移到 `LeviLamina` 后新开发的接口。
+16 -1
View File
@@ -106,7 +106,10 @@ const GMLIB_API = {
getXuidByName: ll.import("GMLIB_API", "getXuidByName"), getXuidByName: ll.import("GMLIB_API", "getXuidByName"),
getUuidByName: ll.import("GMLIB_API", "getUuidByName"), getUuidByName: ll.import("GMLIB_API", "getUuidByName"),
getAllPlayerInfo: ll.import("GMLIB_API", "getAllPlayerInfo"), getAllPlayerInfo: ll.import("GMLIB_API", "getAllPlayerInfo"),
getBlockRuntimeId: ll.import("GMLIB_API", "getBlockRuntimeId") getBlockRuntimeId: ll.import("GMLIB_API", "getBlockRuntimeId"),
addFakeList: ll.import("GMLIB_API", "addFakeList"),
removeFakeList: ll.import("GMLIB_API", "removeFakeList"),
removeAllFakeLists: ll.import("GMLIB_API", "removeAllFakeList")
} }
const FloatingTextList = []; const FloatingTextList = [];
@@ -407,6 +410,18 @@ class Minecraft {
static getBlockRuntimeId(block) { static getBlockRuntimeId(block) {
return GMLIB_API.getBlockRuntimeId(block); return GMLIB_API.getBlockRuntimeId(block);
} }
static addFakeList(name, xuid) {
return GMLIB_API.addFakeList(xuid, name);
}
static removeFakeList(nameOrXuid) {
return GMLIB_API.removeFakeList(nameOrXuid);
}
static removeAllFakeLists() {
return GMLIB_API.removeAllFakeLists();
}
} }
class Recipes { class Recipes {