mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 16:23:12 +09:00
Add onExit to instance template
This commit is contained in:
2 files changed
+15
No files matched your search
@@ -24,13 +24,21 @@ class InstancePlugin extends BaseInstancePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onStart() {
|
async onStart() {
|
||||||
|
// Called once rcon becomes available
|
||||||
this.logger.info("instance::onStart");
|
this.logger.info("instance::onStart");
|
||||||
}
|
}
|
||||||
|
|
||||||
async onStop() {
|
async onStop() {
|
||||||
|
// Called during normal exits before rcon becomes unavailable
|
||||||
this.logger.info("instance::onStop");
|
this.logger.info("instance::onStop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onExit() {
|
||||||
|
// Called during all exits, including crashes and init failures, rcon is not available
|
||||||
|
this.logger.info("instance::onExit");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async onPlayerEvent(event) {
|
async onPlayerEvent(event) {
|
||||||
this.logger.info(`onPlayerEvent::onPlayerEvent ${JSON.stringify(event)}`);
|
this.logger.info(`onPlayerEvent::onPlayerEvent ${JSON.stringify(event)}`);
|
||||||
//%if module
|
//%if module
|
||||||
|
|||||||
@@ -31,13 +31,20 @@ export class InstancePlugin extends BaseInstancePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onStart() {
|
async onStart() {
|
||||||
|
// Called once rcon becomes available
|
||||||
this.logger.info("instance::onStart");
|
this.logger.info("instance::onStart");
|
||||||
}
|
}
|
||||||
|
|
||||||
async onStop() {
|
async onStop() {
|
||||||
|
// Called during normal exits before rcon becomes unavailable
|
||||||
this.logger.info("instance::onStop");
|
this.logger.info("instance::onStop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onExit() {
|
||||||
|
// Called during all exits, including crashes and init failures, rcon is not available
|
||||||
|
this.logger.info("instance::onExit");
|
||||||
|
}
|
||||||
|
|
||||||
async onPlayerEvent(event: lib.PlayerEvent) {
|
async onPlayerEvent(event: lib.PlayerEvent) {
|
||||||
this.logger.info(`onPlayerEvent::onPlayerEvent ${JSON.stringify(event)}`);
|
this.logger.info(`onPlayerEvent::onPlayerEvent ${JSON.stringify(event)}`);
|
||||||
//%if module
|
//%if module
|
||||||
|
|||||||
Reference in new issue
Block a user