Don't send players a ping sound if they have the player that's pinging them ignored

This commit is contained in:
Teriuihi 2022-11-25 19:49:37 +01:00
parent 57afbbe805
commit 0c1b197054

View File

@ -105,6 +105,7 @@ public class ChatListener implements Listener {
.match(Pattern.compile(name, Pattern.CASE_INSENSITIVE))
.replacement(mention.append(onlinePlayer.displayName()))
.build());
if (!ChatUserManager.getChatUser(onlinePlayer.getUniqueId()).getIgnoredPlayers().contains(player.getUniqueId()))
playerToPing.add(onlinePlayer);
} else if (message.contains(nickName.toLowerCase())) {
modifiableString.replace(TextReplacementConfig.builder()
@ -112,6 +113,7 @@ public class ChatListener implements Listener {
.match(Pattern.compile(nickName, Pattern.CASE_INSENSITIVE))
.replacement(mention.append(onlinePlayer.displayName()))
.build());
if (!ChatUserManager.getChatUser(onlinePlayer.getUniqueId()).getIgnoredPlayers().contains(player.getUniqueId()))
playerToPing.add(onlinePlayer);
}
}