diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java index cb93f7736..97bf6c2b1 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandnear.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandnear.java @@ -88,7 +88,7 @@ public class Commandnear extends EssentialsCommand { Queue nearbyPlayers = new PriorityQueue<>((o1, o2) -> (int) (o1.getLocation().distanceSquared(loc) - o2.getLocation().distanceSquared(loc))); for (User player : ess.getOnlineUsers()) { - if (!player.equals(user) && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(player.getBase()))) { + if (!player.equals(user) && !player.isAuthorized("essentials.near.exclude") && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(player.getBase()))) { final Location playerLoc = player.getLocation(); if (playerLoc.getWorld() != world) { continue; diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 7621e204d..06b76fe26 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -568,3 +568,6 @@ permissions: essentials.keepinv: default: false description: Controls whether players keep their inventory on death. + essentials.near.exclude: + default: false + description: If the player should be excluded from near lookups.