Search in sources :

Example 1 with PacketOutCustomChannelMessage

use of de.dytanic.cloudnet.api.network.packet.out.PacketOutCustomChannelMessage in project CloudNet by Dytanic.

the class ChannelMessagingExample method sendCustomMessage.

public void sendCustomMessage() {
    CloudAPI.getInstance().getNetworkConnection().sendPacket(// send a custom channel message to all
    new PacketOutCustomChannelMessage("some-sub-channel-for-proxy", "handle", new Document("foo", "bar")));
    // send a custom channel message to all proxys
    CloudAPI.getInstance().sendCustomSubProxyMessage("some-sub-channel-for-proxy", "handle", new Document("foo", "bar"));
}
Also used : PacketOutCustomChannelMessage(de.dytanic.cloudnet.api.network.packet.out.PacketOutCustomChannelMessage) Document(de.dytanic.cloudnet.lib.utility.document.Document)

Aggregations

PacketOutCustomChannelMessage (de.dytanic.cloudnet.api.network.packet.out.PacketOutCustomChannelMessage)1 Document (de.dytanic.cloudnet.lib.utility.document.Document)1