Skip to content

Commit

Permalink
Don't do visibility checks for OfflinePlayers (#5375)
Browse files Browse the repository at this point in the history
Co-authored-by: MD <[email protected]>
  • Loading branch information
JRoy and mdcfe authored Jul 1, 2023
1 parent ed41790 commit a1fa1e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Essentials/src/main/java/com/earth2me/essentials/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,9 @@ public boolean toggleAfk(final AfkStatusChangeEvent.Cause cause) {

@Override
public boolean isHiddenFrom(Player player) {
if (getBase() instanceof OfflinePlayer || player instanceof OfflinePlayer) {
return true;
}
return !player.canSee(getBase());
}

Expand Down

0 comments on commit a1fa1e3

Please sign in to comment.