mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-08 17:38:20 +01:00
Use isAuthorized for permission check
This commit is contained in:
parent
98239114ad
commit
baa2a2f24f
@ -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.getBase().hasPermission("essentials.near.exclude") && (!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;
|
||||
|
Loading…
Reference in New Issue
Block a user