feat: adapt GMLIB 0.8.5

This commit is contained in:
Tsubasa6848
2024-02-23 17:41:37 +08:00
Unverified
parent 0001f80ff2
commit cb9c8a015d
3 changed files with 13 additions and 5 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ const PAPIregisterServerPlaceholderAPI = ll.import("BEPlaceholderAPI", "register
const PAPIregisterStaticPlaceholderAPI = ll.import("BEPlaceholderAPI", "registerStaticPlaceholder")
const PAPItranslateStringAPI = ll.import("BEPlaceholderAPI", "translateString")
const PAPIunRegisterPlaceholderAPI = ll.import("BEPlaceholderAPI", "unRegisterPlaceholder")
const PAPIgetAllPAPI = ll.import("BEPlaceholderAPI", "getAllPAPI")
Function.prototype.getName = function () {
@@ -13,7 +14,9 @@ Function.prototype.getName = function () {
}
class PAPI {
constructor() { }
constructor() {
throw new Error("Static class cannot be instantiated");
}
static registerPlayerPlaceholder(func, PluginName, PAPIName) {
@@ -47,6 +50,10 @@ class PAPI {
return PAPIunRegisterPlaceholderAPI(str)
}
static getAllPAPI() {
return PAPIgetAllPAPI();
}
}
module.exports = {