fix:fix typo
This commit is contained in:
@@ -50,8 +50,8 @@ const getPluginName = () => {
|
||||
module.exports = {
|
||||
translate(value, actor = undefined, language = "") {
|
||||
return actor instanceof LLSE_Entity
|
||||
? ll.importss("PlaceholderAPI", "translateFromActor")(value, actor, language)
|
||||
: ll.importss("PlaceholderAPI", "translate")(value, language);
|
||||
? ll.imports("PlaceholderAPI", "translateFromActor")(value, actor, language)
|
||||
: ll.imports("PlaceholderAPI", "translate")(value, language);
|
||||
},
|
||||
registerPlaceholder(placeholder, callback) {
|
||||
const pluginName = getPluginName();
|
||||
@@ -59,19 +59,19 @@ module.exports = {
|
||||
if(!args[0].uniqueId) args[0] = undefined;
|
||||
return callback(...args) ?? "<std::nullopt>";
|
||||
}, pluginName, `Placeholder_${placeholder}`);
|
||||
ll.importss("PlaceholderAPI", "registerPlaceholder")(placeholder, `Placeholder_${placeholder}`, pluginName);
|
||||
ll.imports("PlaceholderAPI", "registerPlaceholder")(placeholder, `Placeholder_${placeholder}`, pluginName);
|
||||
},
|
||||
unregisterPlaceholder(placeholder) {
|
||||
return ll.importss("PlaceholderAPI", "unregisterPlaceholder")(placeholder);
|
||||
return ll.imports("PlaceholderAPI", "unregisterPlaceholder")(placeholder);
|
||||
},
|
||||
unregisterPlaceholderFromModName(placeholder) {
|
||||
return ll.importss("PlaceholderAPI", "unregisterPlaceholderFromModName")(placeholder);
|
||||
return ll.imports("PlaceholderAPI", "unregisterPlaceholderFromModName")(placeholder);
|
||||
},
|
||||
getValue(placeholder, actor = undefined, params = {}, language = "") {
|
||||
if (actor instanceof LLSE_Player) actor = ll.imports("GMLib_ServerAPI", "PlayerToEntity")(actor);
|
||||
const result = actor instanceof LLSE_Entity
|
||||
? ll.importss("PlaceholderAPI", "getValueFromActor")(placeholder, actor, params, language)
|
||||
: ll.importss("PlaceholderAPI", "getValue")(placeholder, params, language);
|
||||
? ll.imports("PlaceholderAPI", "getValueFromActor")(placeholder, actor, params, language)
|
||||
: ll.imports("PlaceholderAPI", "getValue")(placeholder, params, language);
|
||||
return result !== "<std::nullopt>" ? result : undefined;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user