mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
Add essentials.seen.uuid permission to show uuids in seen (#4531)
Adds `essentials.seen.uuid` permission requirement to show uuids in `/seen`. People were complaining this cluttered it so whatever. Also adds said permission to the `essentials.seen.extra` permission group. Closes #4499.
This commit is contained in:
parent
7d7a8e47ac
commit
a7b2b675d5
2 changed files with 7 additions and 2 deletions
|
@ -102,7 +102,9 @@ public class Commandseen extends EssentialsCommand {
|
||||||
|
|
||||||
user.setDisplayNick();
|
user.setDisplayNick();
|
||||||
sender.sendMessage(tl("seenOnline", user.getDisplayName(), DateUtil.formatDateDiff(user.getLastLogin())));
|
sender.sendMessage(tl("seenOnline", user.getDisplayName(), DateUtil.formatDateDiff(user.getLastLogin())));
|
||||||
sender.sendMessage(tl("whoisUuid", user.getBase().getUniqueId().toString()));
|
if (sender.isAuthorized("essentials.seen.uuid", ess)) {
|
||||||
|
sender.sendMessage(tl("whoisUuid", user.getBase().getUniqueId().toString()));
|
||||||
|
}
|
||||||
|
|
||||||
final List<String> history = ess.getUserMap().getUserHistory(user.getBase().getUniqueId());
|
final List<String> history = ess.getUserMap().getUserHistory(user.getBase().getUniqueId());
|
||||||
if (history != null && history.size() > 1) {
|
if (history != null && history.size() > 1) {
|
||||||
|
@ -136,7 +138,9 @@ public class Commandseen extends EssentialsCommand {
|
||||||
user.setDisplayNick();
|
user.setDisplayNick();
|
||||||
if (user.getLastLogout() > 0) {
|
if (user.getLastLogout() > 0) {
|
||||||
sender.sendMessage(tl("seenOffline", user.getName(), DateUtil.formatDateDiff(user.getLastLogout())));
|
sender.sendMessage(tl("seenOffline", user.getName(), DateUtil.formatDateDiff(user.getLastLogout())));
|
||||||
sender.sendMessage(tl("whoisUuid", user.getBase().getUniqueId()));
|
if (sender.isAuthorized("essentials.seen.uuid", ess)) {
|
||||||
|
sender.sendMessage(tl("whoisUuid", user.getBase().getUniqueId()));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(tl("userUnknown", user.getName()));
|
sender.sendMessage(tl("userUnknown", user.getName()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -625,6 +625,7 @@ permissions:
|
||||||
children:
|
children:
|
||||||
essentials.seen.ip: true
|
essentials.seen.ip: true
|
||||||
essentials.seen.location: true
|
essentials.seen.location: true
|
||||||
|
essentials.seen.uuid: true
|
||||||
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.
|
||||||
|
|
Loading…
Reference in a new issue