fix: fix missing js-lib
This commit is contained in:
@@ -8,9 +8,7 @@ const PAPIunRegisterPlaceholderAPI = ll.import("BEPlaceholderAPI", "unRegisterPl
|
|||||||
const PAPIgetAllPAPI = ll.import("BEPlaceholderAPI", "getAllPAPI")
|
const PAPIgetAllPAPI = ll.import("BEPlaceholderAPI", "getAllPAPI")
|
||||||
|
|
||||||
Function.prototype.getName = function () {
|
Function.prototype.getName = function () {
|
||||||
|
|
||||||
return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]
|
return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class PAPI {
|
class PAPI {
|
||||||
@@ -19,7 +17,6 @@ class PAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static registerPlayerPlaceholder(func, PluginName, PAPIName) {
|
static registerPlayerPlaceholder(func, PluginName, PAPIName) {
|
||||||
|
|
||||||
ll.export(func, PluginName, func.getName())
|
ll.export(func, PluginName, func.getName())
|
||||||
PAPIregisterPlayerPlaceholderAPI(PluginName, func.getName(), PAPIName)
|
PAPIregisterPlayerPlaceholderAPI(PluginName, func.getName(), PAPIName)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,4 +349,22 @@ class Experiments {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class GMLIB {
|
||||||
|
constructor() {
|
||||||
|
throw new Error("Static class cannot be instantiated");
|
||||||
|
}
|
||||||
|
|
||||||
|
static isVersionMatched(major, minor, patch) {
|
||||||
|
return GMLIB_API.isVersionMatched(major, minor, patch);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getVersion_LRCA() {
|
||||||
|
return GMLIB_API.getVersion_LRCA();
|
||||||
|
}
|
||||||
|
|
||||||
|
static getVersion_GMLIB() {
|
||||||
|
return GMLIB_API.getVersion_GMLIB();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = { StaticFloatingText, DynamicFloatingText, Minecraft, Recipes, Experiments };
|
module.exports = { StaticFloatingText, DynamicFloatingText, Minecraft, Recipes, Experiments };
|
||||||
Reference in New Issue
Block a user