mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-12-09 07:30:04 +08:00
21 lines
381 B
JavaScript
21 lines
381 B
JavaScript
const EventEmitter = require("events");
|
|
|
|
|
|
class ControllerHandle extends EventEmitter {
|
|
constructor(args) {
|
|
super(args);
|
|
}
|
|
|
|
listener(event, ...agrs) {
|
|
this.on(event, agrs);
|
|
}
|
|
|
|
notify(event, ...args) {
|
|
this.emit(event, args);
|
|
}
|
|
}
|
|
|
|
|
|
const onlyControllerHandle = new ControllerHandle();
|
|
|
|
exports.ControllerHandle = onlyControllerHandle; |