-
Notifications
You must be signed in to change notification settings - Fork 25
Developer API Guide
New in CraftIRC 2.x is an API for developers to integrate CraftIRC into their existing plugins, and create all-new CraftIRC plugins with ease.
Tags: Each server operator can configure CraftIRC to output to as many IRC servers and channels as they like. Addressing each individual channel has been abstracted into the concept of the 'Tag'. Server operators can define the tag of a server (which serves to allow messaging all channels that CraftIRC resides in, on that server), and also the Tag of a channel (which serves to target messages to that single channel). It is good practice to allow your plugin users to define which Tags (preferably channel tags) to associate with your plugin.
For example: if you are writing a chat plugin which supports multiple in-game chatrooms, you may want to add an IRC chatroom within your plugin to consolidate such conversations. Allow the server operator to designate which channel Tag/s to associate with that chatroom, so that you can route the output of that chat to appropriate Tags.
You can send a message to a Tag via CraftIRC.sendMsgToTag(String tag)