Fixed occassional echoing

This commit is contained in:
Norbi Peti 2016-12-07 10:34:32 +01:00 committed by GitHub
parent 2e00849303
commit 4238a23d39

View file

@ -26,7 +26,7 @@ import sx.blah.discord.handle.obj.IUser;
public class MCChatListener implements Listener, IListener<MessageReceivedEvent> {
@EventHandler // Minecraft
public void onMCChat(TBMCChatEvent e) {
if (e.getSender() instanceof DiscordSender)
if (e.getSender() instanceof DiscordSender || e.getSender() instanceof DiscordPlayerSender)
return;
if (e.getChannel().equals(Channel.GlobalChat))
DiscordPlugin.sendMessageToChannel(DiscordPlugin.chatchannel, "<" + (e.getSender() instanceof Player