diff --git a/Plugins/Mineplex.Core/src/mineplex/core/chatsnap/SnapshotPlugin.java b/Plugins/Mineplex.Core/src/mineplex/core/chatsnap/SnapshotPlugin.java index 984e4e0d2..da34ad212 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/chatsnap/SnapshotPlugin.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/chatsnap/SnapshotPlugin.java @@ -3,6 +3,8 @@ package mineplex.core.chatsnap; import java.util.Set; import java.util.stream.Collectors; +import mineplex.core.chat.ChatChannel; +import mineplex.core.chat.event.FormatPlayerChatEvent; import mineplex.core.message.MessageManager; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -60,7 +62,7 @@ public class SnapshotPlugin extends MiniPlugin } @EventHandler(priority = EventPriority.MONITOR) - public void onPlayerChat(AsyncPlayerChatEvent e) + public void onPlayerChat(FormatPlayerChatEvent e) { if (_punish.GetClient(e.getPlayer().getName()).IsMuted()) { @@ -81,14 +83,14 @@ public class SnapshotPlugin extends MiniPlugin return players.stream().map(_clientManager::getAccountId).collect(Collectors.toSet()); } - public SnapshotMessage createSnapshot(AsyncPlayerChatEvent e) + public SnapshotMessage createSnapshot(FormatPlayerChatEvent e) { MessageType messageType = MessageType.CHAT; int senderId = _clientManager.getAccountId(e.getPlayer()); Set recipientIds = getAccountIds(e.getRecipients()); recipientIds.remove(senderId); - if (e.getFormat().contains("Party")) + if (e.getChatChannel() == ChatChannel.PARTY) { messageType = MessageType.PARTY; }