diff --git a/src/entity/instance/on_demand.ts b/src/entity/instance/on_demand.ts index b5b4fa5..49994b5 100644 --- a/src/entity/instance/on_demand.ts +++ b/src/entity/instance/on_demand.ts @@ -14,7 +14,8 @@ export class OnDemandRunner { } public async run(port: number) { - logger.info(`${this.instance.instanceUuid} OnDemandRunner started.`); + logger.info(`${this.instance.instanceUuid} `, $t("on_demand.start")); + this.instance.println("INFO", $t("on_demand.start")); this.running = true; return new Promise(async (resolve, reject) => { try { @@ -92,6 +93,8 @@ export class OnDemandRunner { this.instance.execPreset("stop", "OnDemandRunner"); } this.instance.stopped(); + this.instance.println("INFO", $t("on_demand.stop")); + logger.info(`${this.instance.instanceUuid} `, $t("on_demand.stop")); } private startSocketServer(port: number) { diff --git a/src/i18n/language/en_us.json b/src/i18n/language/en_us.json index 9244fd1..f0a8cc0 100755 --- a/src/i18n/language/en_us.json +++ b/src/i18n/language/en_us.json @@ -227,6 +227,8 @@ "on_demand": { "cantStartOnDemand": "May not a Minecraft server, unable to start on demand.", "over30minClose": "Instance has been vancant for more than 30 minutes, going to sleep...", - "instanceSleeping": "Instance is sleeping, waiting for player to wake it up." + "instanceSleeping": "Instance is sleeping, waiting for player to wake it up.", + "start": "On demand sequence started.", + "stop": "On demand sequence stopped." } } diff --git a/src/i18n/language/zh_cn.json b/src/i18n/language/zh_cn.json index 2ad4172..cd23eab 100755 --- a/src/i18n/language/zh_cn.json +++ b/src/i18n/language/zh_cn.json @@ -227,6 +227,8 @@ "on_demand": { "cantStartOnDemand": "可能由于不是Minecraft服务器,无法使用按需启动功能。", "over30minClose": "实例超过30分钟不活跃,正在进入休眠状态。", - "instanceSleeping": "实例已休眠,等待玩家唤醒。" + "instanceSleeping": "实例已休眠,等待玩家唤醒。", + "start": "已进入按需启动模式,实例将在超过30分钟不活跃后自动关闭并在玩家进入时自动开启。", + "stop": "已退出按需启动模式。" } }