mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-08 13:33:24 +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
|
@ -5,6 +5,7 @@ import com.earth2me.essentials.IUser;
|
|||
import com.earth2me.essentials.User;
|
||||
import net.ess3.api.events.PrivateMessagePreSendEvent;
|
||||
import net.ess3.api.events.PrivateMessageSentEvent;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
@ -190,4 +191,9 @@ public class SimpleMessageRecipient implements IMessageRecipient {
|
|||
public void setReplyRecipient(final IMessageRecipient replyRecipient) {
|
||||
this.replyRecipient = new WeakReference<>(replyRecipient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHiddenFrom(Player player) {
|
||||
return parent.isHiddenFrom(player);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue