mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 17:47:34 +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)));
|
Queue<User> nearbyPlayers = new PriorityQueue<>((o1, o2) -> (int) (o1.getLocation().distanceSquared(loc) - o2.getLocation().distanceSquared(loc)));
|
||||||
|
|
||||||
for (User player : ess.getOnlineUsers()) {
|
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();
|
final Location playerLoc = player.getLocation();
|
||||||
if (playerLoc.getWorld() != world) {
|
if (playerLoc.getWorld() != world) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -564,3 +564,6 @@ permissions:
|
|||||||
essentials.keepinv:
|
essentials.keepinv:
|
||||||
default: false
|
default: false
|
||||||
description: Controls whether players keep their inventory on death.
|
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