2020-02-26 02:15:33 +00:00
|
|
|
import { channel } from '@ms/api'
|
|
|
|
import { provideSingleton } from '@ms/container'
|
2020-02-24 10:36:08 +00:00
|
|
|
|
|
|
|
const Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy()
|
|
|
|
|
2020-02-26 02:15:33 +00:00
|
|
|
@provideSingleton(channel.Channel)
|
2020-02-24 10:36:08 +00:00
|
|
|
export class BungeeChannel extends channel.Channel {
|
|
|
|
send(player: any, channel: string, data: any) {
|
|
|
|
throw new Error("Method not implemented.");
|
|
|
|
}
|
|
|
|
register(channel: string, listener: channel.ChannelListener) {
|
|
|
|
Bungee.registerChannel(channel);
|
|
|
|
console.console('§6[§eWARN§6] §eBungeeCord Channel only registerChannel you need self hanler PluginMessageEvent!')
|
|
|
|
}
|
|
|
|
unregister(channel: string, listener: any) {
|
|
|
|
Bungee.unregisterChannel(channel);
|
|
|
|
}
|
|
|
|
}
|