Firedroide/BukkitSpeak — pull request #4 by graywolf336 (2012-10-30 04:55:40+00:00)
Title: Add support for Herochat.

What does this do? First we add an option to the config.yml and that has Herochat enabled and then the channel that we are to use. Then onEnable() we see if we are to use herochat, if so see if herochat is enabled and then if so get the channel and if it isnt null. Once all of that validates (errors are caught) then we set the herochat boolean to true and the name of the channel to use. onPlayerChat sees if herochat is enabled and if so it returns, this is done so that we use Herochats ChannelChatEvent and so we dont have duplicate messages being sent.

The ChannelChatEvent then does all the checking and all that good stuff like onPlayerChat would and events the messages just like onPlayerChat would except we only get the channel stated in the config.

Chat sent from the teamspeak in the channel is only sent to the channel stated in the config, so say we have a Teamspeak channel in Herochat what this does is sends all the chat from Teamspeak to that channel and that channel only. This is a good way to do it in my opinion, though there probably are better ways out there.

If you have any questions, please let me know