Search in sources :

Example 1 with SCIRCBot

use of net.geforcemods.securitycraft.ircbot.SCIRCBot in project SecurityCraft by Geforce132.

the class ForgeEventHandler method onServerChatEvent.

@SubscribeEvent
public void onServerChatEvent(ServerChatEvent event) {
    SCIRCBot bot = mod_SecurityCraft.instance.getIrcBot(event.getPlayer().getName());
    if (bot != null && bot.getMessageMode()) {
        event.setCanceled(true);
        bot.sendMessage("> " + event.getMessage());
        bot.sendMessageToPlayer(TextFormatting.GRAY + "<" + event.getPlayer().getName() + " --> IRC> " + event.getMessage(), event.getPlayer());
    }
}
Also used : SCIRCBot(net.geforcemods.securitycraft.ircbot.SCIRCBot) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

SCIRCBot (net.geforcemods.securitycraft.ircbot.SCIRCBot)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1