mirror of
https://github.com/PHIDIAS0303/ClusterChatSync.git
synced 2025-12-27 03:05:21 +09:00
.
This commit is contained in:
19
instance.js
Normal file
19
instance.js
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
const lib = require("@clusterio/lib");
|
||||
const { BaseInstancePlugin } = require("@clusterio/host");
|
||||
|
||||
class InstancePlugin extends BaseInstancePlugin {
|
||||
async init() {
|
||||
this.messageQueue = [];
|
||||
}
|
||||
|
||||
async onOutput(output) {
|
||||
if (output.type == "action") {
|
||||
this.messageQueue.push([output.action, output.message]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
InstancePlugin
|
||||
};
|
||||
Reference in New Issue
Block a user