mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-29 04:28:15 +01:00
Show afk warning when pm'ing afk players.
Fix vanished leak on player matching.
This commit is contained in:
parent
50dca9abf5
commit
443a317184
@ -79,14 +79,25 @@ public class Commandmsg extends EssentialsCommand
|
||||
|
||||
for (Player matchedPlayer : matchedPlayers)
|
||||
{
|
||||
sender.sendMessage(_("msgFormat", translatedMe, matchedPlayer.getDisplayName(), message));
|
||||
final User matchedUser = ess.getUser(matchedPlayer);
|
||||
if (sender instanceof Player && (matchedUser.isIgnoredPlayer(ess.getUser(sender)) || matchedUser.isHidden()))
|
||||
|
||||
if (sender instanceof Player && matchedUser.isHidden())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (matchedUser.isAfk())
|
||||
{
|
||||
sender.sendMessage(_("userAFK", matchedPlayer.getDisplayName()));
|
||||
}
|
||||
|
||||
sender.sendMessage(_("msgFormat", translatedMe, matchedPlayer.getDisplayName(), message));
|
||||
if (sender instanceof Player && matchedUser.isIgnoredPlayer(ess.getUser(sender)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
matchedPlayer.sendMessage(_("msgFormat", senderName, translatedMe, message));
|
||||
replyTo.setReplyTo(ess.getUser(matchedPlayer));
|
||||
replyTo.setReplyTo(matchedUser);
|
||||
ess.getUser(matchedPlayer).setReplyTo(sender);
|
||||
}
|
||||
}
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -496,3 +496,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
@ -493,3 +493,4 @@ muteNotify=\u00a74{0} \u00a76has muted \u00a74{1}
|
||||
resetBal=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all online players
|
||||
resetBalAll=\u00a76Balance has been reset to \u00a7a{0} \u00a76 for all players
|
||||
messageTruncated=\u00a74Message truncated, to see the full output type:\u00a7c /{0} {1}
|
||||
userAFK=\u00a75{0} \u00a75is currently AFK and may not respond
|
||||
|
Loading…
Reference in New Issue
Block a user