Add option to prevent replying from vanished players (#3703)

Closes #2066
This commit is contained in:
Josh Roy 2020-11-09 07:25:16 -05:00 committed by GitHub
parent 4d9a10147a
commit bb43e8f7b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 1 deletions

View file

@ -567,6 +567,11 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
return isAfk();
}
@Override
public boolean isHiddenFrom(Player player) {
return !player.canSee(getBase());
}
@Override
public boolean isHidden() {
return hidden;