mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 05:26:19 +01:00
Ignore private hc messages.
This commit is contained in:
parent
8cc249649c
commit
d558739877
@ -18,9 +18,11 @@ package com.cnaude.purpleirc.GameListeners;
|
||||
|
||||
import com.cnaude.purpleirc.PurpleBot;
|
||||
import com.cnaude.purpleirc.PurpleIRC;
|
||||
import com.dthielke.api.Channel;
|
||||
import com.dthielke.api.ChatResult;
|
||||
import com.dthielke.api.Chatter;
|
||||
import com.dthielke.api.event.ChannelChatEvent;
|
||||
import com.dthielke.channel.ConversationChannel;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -50,6 +52,11 @@ public class HeroChatListener implements Listener {
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.NORMAL)
|
||||
public void onChannelChatEvent(ChannelChatEvent event) {
|
||||
Chatter chatter = event.getChatter();
|
||||
Channel channel = chatter.getActiveChannel();
|
||||
if ((channel instanceof ConversationChannel)) {
|
||||
plugin.logDebug("Ignoring private message: " + chatter.getPrivateMessageFocus() + ":" + event.getMessage());
|
||||
return;
|
||||
}
|
||||
ChatResult result = event.getResult();
|
||||
plugin.logDebug("HC Format: " + event.getFormat());
|
||||
plugin.logDebug("HC Result: " + event.getResult());
|
||||
|
Loading…
Reference in New Issue
Block a user