Skip to content

Commit 49ca640

Browse files
committed
Merge PR EssentialsX#6627: Require essentials.whois.location to view coordinates in /whois
2 parents c7e32bd + 587e710 commit 49ca640

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎Essentials/src/main/java/com/earth2me/essentials/commands/Commandwhois.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public void run(final Server server, final CommandSource sender, final String co
3939
sender.sendTl("whoisHealth", user.getBase().getHealth());
4040
sender.sendTl("whoisHunger", user.getBase().getFoodLevel(), user.getBase().getSaturation());
4141
sender.sendTl("whoisExp", SetExpFix.getTotalExperience(user.getBase()), user.getBase().getLevel());
42-
sender.sendTl("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ());
42+
if (sender.isAuthorized("essentials.whois.location")) {
43+
sender.sendTl("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ());
44+
}
4345
final long playtimeMs = System.currentTimeMillis() - (user.getBase().getStatistic(PLAY_ONE_TICK) * 50L);
4446
sender.sendTl("whoisPlaytime", DateUtil.formatDateDiff(playtimeMs));
4547
if (!ess.getSettings().isEcoDisabled()) {

‎Essentials/src/main/resources/plugin.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,8 @@ permissions:
14011401
description: Allows access to the /whois command
14021402
essentials.whois.ip:
14031403
description: Allows access to the /whois command with IP address
1404+
essentials.whois.location:
1405+
description: Allows access to the /whois command with location
14041406
essentials.workbench:
14051407
description: Allows access to the /workbench command
14061408
essentials.anvil:

0 commit comments

Comments
 (0)