feat: adapt GMLIB 0.8.5
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user