mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Near exclude permission
This commit is contained in:
parent
c10b39c1c7
commit
98239114ad
@ -88,7 +88,7 @@ public class Commandnear extends EssentialsCommand {
|
||||
Queue<User> 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.getBase().hasPermission("essentials.near.exclude") && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(player.getBase()))) {
|
||||
final Location playerLoc = player.getLocation();
|
||||
if (playerLoc.getWorld() != world) {
|
||||
continue;
|
||||
|
@ -564,3 +564,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.
|
||||
|
Loading…
Reference in New Issue
Block a user