diff options
author | ementalo <ementalodev@gmx.co.uk> | 2012-06-18 13:06:32 +0100 |
---|---|---|
committer | ementalo <ementalodev@gmx.co.uk> | 2012-06-18 13:06:32 +0100 |
commit | 88e7e684afbc67ad7b6410e5429c2760cd93b542 (patch) | |
tree | 48d950d16ca140b074b2c06b0d4e8037a5c2d7ba | |
parent | faea8af22e78fbf7a63356d8f2e4b67d9b1d0431 (diff) | |
download | Essentials-88e7e684afbc67ad7b6410e5429c2760cd93b542.tar Essentials-88e7e684afbc67ad7b6410e5429c2760cd93b542.tar.gz Essentials-88e7e684afbc67ad7b6410e5429c2760cd93b542.tar.lz Essentials-88e7e684afbc67ad7b6410e5429c2760cd93b542.tar.xz Essentials-88e7e684afbc67ad7b6410e5429c2760cd93b542.zip |
Messing around with whois syntax (TL's probably need some love)
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandwhois.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java index 8d49c2776..858e601f5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandwhois.java @@ -59,16 +59,25 @@ public class Commandwhois extends EssentialsCommand continue; } foundPlayer = true; - sender.sendMessage(""); + sender.sendMessage(_("whoisTop", user.getName())); user.setDisplayNick(); sender.sendMessage(_("whoisIs", user.getDisplayName(), user.getName())); sender.sendMessage(_("whoisHealth", user.getHealth())); sender.sendMessage(_("whoisExp", SetExpFix.getTotalExperience(user), user.getLevel())); - sender.sendMessage(_("whoisOP", (user.isOp() ? _("true") : _("false")))); - sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false")))); - sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)))); sender.sendMessage(_("whoisLocation", user.getLocation().getWorld().getName(), user.getLocation().getBlockX(), user.getLocation().getBlockY(), user.getLocation().getBlockZ())); sender.sendMessage(_("whoisMoney", Util.displayCurrency(user.getMoney(), ess))); + sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString())); + final String location = user.getData().getGeolocation(); + if (location != null + && Permissions.GEOIP_SHOW.isAuthorized(sender)) + { + sender.sendMessage(_("whoisGeoLocation", location)); + } + sender.sendMessage(_("whoisGamemode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)))); + sender.sendMessage(_("whoisGod", (user.isGodModeEnabled() ? _("true") : _("false")))); + sender.sendMessage(_("whoisOP", (user.isOp() ? _("true") : _("false")))); + sender.sendMessage(_("whoisFly", user.getAllowFlight() ? _("true") : _("false"), user.isFlying() ? _("flying") : _("notFlying"))); + sender.sendMessage(_("whoisAFK", (user.getData().isAfk() ? _("true") : _("false")))); sender.sendMessage(_("whoisJail", (user.getData().isJailed() ? user.getTimestamp(UserData.TimestampType.JAIL) > 0 ? DateUtil.formatDateDiff(user.getTimestamp(UserData.TimestampType.JAIL)) @@ -79,16 +88,7 @@ public class Commandwhois extends EssentialsCommand ? DateUtil.formatDateDiff(user.getTimestamp(UserData.TimestampType.MUTE)) : _("true") : _("false")))); - sender.sendMessage(user.getData().isAfk() - ? _("whoisStatusAway") - : _("whoisStatusAvailable")); - sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString())); - final String location = user.getData().getGeolocation(); - if (location != null - && Permissions.GEOIP_SHOW.isAuthorized(sender)) - { - sender.sendMessage(_("whoisGeoLocation", location)); - } + if (!foundPlayer) { throw new NoSuchFieldException(_("playerNotFound")); |