Give ChatBots access to plugin channels.

Chatbots may find it useful to send messages over plugin channels.  This allows REGISTERing, UNREGISTERing, and sending over plugin channels, with built-in checking if the server also registered the channel (which can be disabled by the bot if needed). Unused channels are UNREGISTERed when a bot is disabled.
This commit is contained in:
Pokechu22 2016-02-07 14:24:01 -08:00
parent bdbd8ab0b8
commit 1ea8f119d9
5 changed files with 215 additions and 3 deletions

View file

@ -303,6 +303,10 @@ namespace MinecraftClient.Protocol.Handlers
readNextVarShort(packetData);
}
}
// The remaining data in the array is the entire payload of the packet.
handler.OnPluginChannelMessage(channel, packetData.ToArray());
if (forgeInfo != null)
{
if (channel == "FML|HS")