类 MessageChannelContext
java.lang.Object
cn.afternode.commons.bungee.messaging.MessageChannelContext
- 所有已实现的接口:
Closeable,AutoCloseable,net.md_5.bungee.api.plugin.Listener
-
方法概要
修饰符和类型方法说明voidclose()voidonPluginMessage(net.md_5.bungee.api.event.PluginMessageEvent event) voidsend(net.md_5.bungee.api.connection.ProxiedPlayer player, NBungeeByteBuf buf) Send message to channel through specified playervoidsendAll(NBungeeByteBuf buf) Send message to all servers with at least 1 player online
-
方法详细资料
-
onPluginMessage
public void onPluginMessage(net.md_5.bungee.api.event.PluginMessageEvent event) -
send
public void send(net.md_5.bungee.api.connection.ProxiedPlayer player, NBungeeByteBuf buf) throws NoSuchAlgorithmException, InvalidKeyException, IOException Send message to channel through specified player- 参数:
player- Playerbuf- Data- 抛出:
NoSuchAlgorithmException- Signing errorInvalidKeyException- Signing errorIOException- Using a closed channel
-
sendAll
public void sendAll(NBungeeByteBuf buf) throws IOException, NoSuchAlgorithmException, InvalidKeyException Send message to all servers with at least 1 player online- 参数:
buf- Data- 抛出:
IOException- Using a closed channelNoSuchAlgorithmException- Signing errorInvalidKeyException- Signing error
-
close
- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 抛出:
IOException
-