diff --git a/template/GMLIB_LRCA-Plugin-Template/GMLIB_LRCA-Plugin-Template.js b/template/GMLIB_LRCA-Plugin-Template/GMLIB_LRCA-Plugin-Template.js deleted file mode 100644 index 4813570..0000000 --- a/template/GMLIB_LRCA-Plugin-Template/GMLIB_LRCA-Plugin-Template.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * @name GMLIB_LRCA-Plugin-Template - * @brief plugin template for GMLIB-LegacyRemoteCallApi - * - * @copyright Copyright (c) 2024 GroupMountain - * GMLIB-LegacyRemoteCallApi - * - */ - -const PluginInfo = { - Name: "GMLIB_LRCA-Plugin-Template", - Author: "your name", - Version: "0.0.1" -} - -// 导入 API -const { JsonConfig, JsonI18n } = require('./GMLIB-LegacyRemoteCallApi/lib/GMLIB_API-JS'); - -// 默认配置文件 -const defaultConfig = { - "language": "zh_CN" -}; - -// 默认语言文件 -const zh_CN = { - "consolelog.loaded": "加载成功!", - "consolelog.info": "插件作者: {1}, 当前版本: v{2}" -}; - -// 初始化配置文件 -const config = new JsonConfig(`./plugins/${PluginInfo.Name}/config/config.json`, defaultConfig); - -// 初始化 I18n -const I18n = new JsonI18n(`./plugins/${PluginInfo.Name}/language/`, config.get("language")); -I18n.loadLanguage("zh_CN", zh_CN); // 升级语言文件 -I18n.setDefaultLanguage("zh_CN"); // 设置I18n无法翻译时采用的默认语言 - -// I18n快捷翻译函数 -function tr(key, data = []) { - return I18n.translate(key, data); -} - -// 监听服务器启动 -// 在无特殊说明的情况下,一切 MCAPI 都应该在服务器启动后访问。 -mc.listen("onServerStarted", () => { - // 你的代码 - - - // 打印插件信息 - logger.info(tr("consolelog.loaded")); - logger.info(tr("consolelog.info", [PluginInfo.Author, PluginInfo.Version])); -}); \ No newline at end of file diff --git a/template/GMLIB_LRCA-Plugin-Template/config/config.json b/template/GMLIB_LRCA-Plugin-Template/config/config.json deleted file mode 100644 index 5f2a55d..0000000 --- a/template/GMLIB_LRCA-Plugin-Template/config/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "language": "zh_CN" -} \ No newline at end of file diff --git a/template/GMLIB_LRCA-Plugin-Template/language/zh_CN.json b/template/GMLIB_LRCA-Plugin-Template/language/zh_CN.json deleted file mode 100644 index 084709f..0000000 --- a/template/GMLIB_LRCA-Plugin-Template/language/zh_CN.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "consolelog.loaded": "加载成功!", - "consolelog.info": "插件作者: {1}, 当前版本: v{2}" -} \ No newline at end of file diff --git a/template/GMLIB_LRCA-Plugin-Template/manifest.json b/template/GMLIB_LRCA-Plugin-Template/manifest.json deleted file mode 100644 index 2df6d9b..0000000 --- a/template/GMLIB_LRCA-Plugin-Template/manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "entry": "GMLIB_LRCA-Plugin-Template.js", - "name": "GMLIB_LRCA-Plugin-Template", - "type": "lse-quickjs", - "version": "0.0.1", - "author": "Your Name", - "description": "plugin description", - "dependencies": [ - { - "name": "legacy-script-engine-quickjs" - }, - { - "name": "GMLIB-LegacyRemoteCallApi" - } - ] -} \ No newline at end of file