/// <summary> /// Sends a plugin channel packet to the server. See http://wiki.vg/Plugin_channel for more information /// about plugin channels. /// </summary> /// <param name="channel">The channel to send the packet on.</param> /// <param name="data">The payload for the packet.</param> /// <param name="sendEvenIfNotRegistered">Whether the packet should be sent even if the server or the client hasn't registered it yet.</param> /// <returns>Whether the packet was sent: true if it was sent, false if there was a connection error or it wasn't registered.</returns> public bool SendPluginChannelMessage(string channel, byte[] data, bool sendEvenIfNotRegistered = false) { if (!sendEvenIfNotRegistered) { if (!registeredBotPluginChannels.ContainsKey(channel)) { return(false); } if (!registeredServerPluginChannels.Contains(channel)) { return(false); } } return(handler.SendPluginChannelPacket(channel, data)); }