mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-07 22:38:06 +00:00
[Feature] Added an option to spy chat messages from muted players (#1430)
Related to https://github.com/drtshock/Essentials/issues/1420
This commit is contained in:
parent
7fbc721db6
commit
fd63a7df4e
6 changed files with 36 additions and 14 deletions
|
@ -95,8 +95,12 @@ public class SimpleMessageRecipient implements IMessageRecipient {
|
|||
if (onlineUser.isSocialSpyEnabled()
|
||||
// Don't send socialspy messages to message sender/receiver to prevent spam
|
||||
&& !onlineUser.equals(senderUser)
|
||||
&& !onlineUser.equals(recipient)) {
|
||||
onlineUser.sendMessage(tl("socialSpyPrefix") + tl("msgFormat", getDisplayName(), recipient.getDisplayName(), message));
|
||||
&& !onlineUser.equals(recipient)) {
|
||||
if (senderUser.isMuted() && ess.getSettings().getSocialSpyListenMutedPlayers()) {
|
||||
onlineUser.sendMessage(tl("socialMutedSpyPrefix") + tl("msgFormat", getDisplayName(), recipient.getDisplayName(), message));
|
||||
} else {
|
||||
onlineUser.sendMessage(tl("socialSpyPrefix") + tl("msgFormat", getDisplayName(), recipient.getDisplayName(), message));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue