forked from mirror/MCSM-Daemon
按需启动添加了相应的提示日志
This commit is contained in:
parent
96d2fff4cf
commit
672c7fc340
@ -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<void>(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) {
|
||||
|
@ -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."
|
||||
}
|
||||
}
|
||||
|
@ -227,6 +227,8 @@
|
||||
"on_demand": {
|
||||
"cantStartOnDemand": "可能由于不是Minecraft服务器,无法使用按需启动功能。",
|
||||
"over30minClose": "实例超过30分钟不活跃,正在进入休眠状态。",
|
||||
"instanceSleeping": "实例已休眠,等待玩家唤醒。"
|
||||
"instanceSleeping": "实例已休眠,等待玩家唤醒。",
|
||||
"start": "已进入按需启动模式,实例将在超过30分钟不活跃后自动关闭并在玩家进入时自动开启。",
|
||||
"stop": "已退出按需启动模式。"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user