mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-15 05:33:40 +00:00
GeoIP already has a perm, doesn't need hidden behind essentials.seen.extra as well.
This commit is contained in:
parent
19451c151e
commit
88c5b64694
1 changed files with 14 additions and 15 deletions
|
@ -73,24 +73,23 @@ public class Commandseen extends EssentialsCommand
|
||||||
if (user.isJailed())
|
if (user.isJailed())
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisJail", (user.getJailTimeout() > 0
|
sender.sendMessage(_("whoisJail", (user.getJailTimeout() > 0
|
||||||
? Util.formatDateDiff(user.getJailTimeout())
|
? Util.formatDateDiff(user.getJailTimeout())
|
||||||
: _("true"))));
|
: _("true"))));
|
||||||
}
|
}
|
||||||
if (user.isMuted())
|
if (user.isMuted())
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisMuted", (user.getMuteTimeout() > 0
|
sender.sendMessage(_("whoisMuted", (user.getMuteTimeout() > 0
|
||||||
? Util.formatDateDiff(user.getMuteTimeout())
|
? Util.formatDateDiff(user.getMuteTimeout())
|
||||||
: _("true"))));
|
: _("true"))));
|
||||||
|
}
|
||||||
|
final String location = user.getGeoLocation();
|
||||||
|
if (location != null && (!(sender instanceof Player) || ess.getUser(sender).isAuthorized("essentials.geoip.show")))
|
||||||
|
{
|
||||||
|
sender.sendMessage(_("whoisGeoLocation", location));
|
||||||
}
|
}
|
||||||
if (extra)
|
if (extra)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString()));
|
sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString()));
|
||||||
final String location = user.getGeoLocation();
|
|
||||||
if (location != null && (!(sender instanceof Player) || ess.getUser(sender).isAuthorized("essentials.geoip.show")))
|
|
||||||
{
|
|
||||||
sender.sendMessage(_("whoisGeoLocation", location));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,17 +108,17 @@ public class Commandseen extends EssentialsCommand
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisBanned", showBan ? user.getBanReason() : _("true")));
|
sender.sendMessage(_("whoisBanned", showBan ? user.getBanReason() : _("true")));
|
||||||
}
|
}
|
||||||
|
final String location = user.getGeoLocation();
|
||||||
|
if (location != null && (!(sender instanceof Player) || ess.getUser(sender).isAuthorized("essentials.geoip.show")))
|
||||||
|
{
|
||||||
|
sender.sendMessage(_("whoisGeoLocation", location));
|
||||||
|
}
|
||||||
if (extra)
|
if (extra)
|
||||||
{
|
{
|
||||||
if (!user.getLastLoginAddress().isEmpty())
|
if (!user.getLastLoginAddress().isEmpty())
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisIPAddress", user.getLastLoginAddress()));
|
sender.sendMessage(_("whoisIPAddress", user.getLastLoginAddress()));
|
||||||
}
|
}
|
||||||
final String location = user.getGeoLocation();
|
|
||||||
if (location != null && (!(sender instanceof Player) || ess.getUser(sender).isAuthorized("essentials.geoip.show")))
|
|
||||||
{
|
|
||||||
sender.sendMessage(_("whoisGeoLocation", location));
|
|
||||||
}
|
|
||||||
final Location loc = user.getLogoutLocation();
|
final Location loc = user.getLogoutLocation();
|
||||||
if (loc != null)
|
if (loc != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue