fix: fix missing js-lib

This commit is contained in:
Tsubasa6848
2024-02-24 11:14:27 +08:00
Unverified
parent 01ebf91b43
commit ede771a966
2 changed files with 18 additions and 3 deletions
-3
View File
@@ -8,9 +8,7 @@ const PAPIunRegisterPlaceholderAPI = ll.import("BEPlaceholderAPI", "unRegisterPl
const PAPIgetAllPAPI = ll.import("BEPlaceholderAPI", "getAllPAPI")
Function.prototype.getName = function () {
return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]
}
class PAPI {
@@ -19,7 +17,6 @@ class PAPI {
}
static registerPlayerPlaceholder(func, PluginName, PAPIName) {
ll.export(func, PluginName, func.getName())
PAPIregisterPlayerPlaceholderAPI(PluginName, func.getName(), PAPIName)
}