mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-04 03:25:50 +00:00
Use isAuthorized for permission check
This commit is contained in:
parent
98239114ad
commit
baa2a2f24f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue