mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-26 15:33:56 +00:00
Add option to prevent replying from vanished players (#3703)
Closes #2066
This commit is contained in:
parent
4d9a10147a
commit
bb43e8f7b6
8 changed files with 35 additions and 1 deletions
|
@ -42,7 +42,8 @@ public class Commandr extends EssentialsCommand {
|
|||
|
||||
final IMessageRecipient target = messageSender.getReplyRecipient();
|
||||
// Check to make sure the sender does have a quick-reply recipient
|
||||
if (target == null) {
|
||||
if (target == null || (!ess.getSettings().isReplyToVanished() && sender.isPlayer() && target.isHiddenFrom(sender.getPlayer()))) {
|
||||
messageSender.setReplyRecipient(null);
|
||||
throw new Exception(tl("foreverAlone"));
|
||||
}
|
||||
messageSender.sendMessage(target, message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue