diff options
author | Chris Ward <chris@chrisgward.com> | 2013-01-09 20:13:44 +1100 |
---|---|---|
committer | Chris Ward <chris@chrisgward.com> | 2013-01-09 20:13:44 +1100 |
commit | bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af (patch) | |
tree | cce75618bab2fea24b2ce7c6b185231e79c6b4aa | |
parent | 9222be9145c56c338c11203205f0a41f82d120e4 (diff) | |
download | Essentials-bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af.tar Essentials-bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af.tar.gz Essentials-bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af.tar.lz Essentials-bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af.tar.xz Essentials-bef0ed7cad4ee058cdd396e84a74e1cb1ccdf5af.zip |
Make seen statuses only show when true
c97763c3c8c22830e2db353a38c417dee8ddb2e3
-rw-r--r-- | Essentials/src/net/ess3/commands/Commandseen.java | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandseen.java b/Essentials/src/net/ess3/commands/Commandseen.java index 4eb10ef6f..9613f2649 100644 --- a/Essentials/src/net/ess3/commands/Commandseen.java +++ b/Essentials/src/net/ess3/commands/Commandseen.java @@ -34,17 +34,22 @@ public class Commandseen extends EssentialsCommand final IUser u = ess.getUserMap().matchUserExcludingHidden(args[0], getPlayerOrNull(sender)); u.setDisplayNick(); sender.sendMessage(_("seenOnline", u.getPlayer().getDisplayName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGIN)))); - sender.sendMessage(_("whoisAFK", (u.getData().isAfk() ? _("true") : _("false")))); - sender.sendMessage(_("whoisJail", (u.getData().isJailed() - ? u.getTimestamp(TimestampType.JAIL) > 0 - ? DateUtil.formatDateDiff(u.getTimestamp(TimestampType.JAIL)) - : _("true") - : _("false")))); - sender.sendMessage(_("whoisMuted", (u.getData().isMuted() - ? u.getTimestamp(TimestampType.MUTE) > 0 - ? DateUtil.formatDateDiff(u.getTimestamp(TimestampType.MUTE)) - : _("true") - : _("false")))); + if(u.getData().isAfk()) + { + sender.sendMessage(_("whoisAFK", _("true"))); + } + if(u.getData().isJailed()) + { + sender.sendMessage(_("whoisJail", u.getTimestamp(TimestampType.JAIL) > 0 + ? DateUtil.formatDateDiff(u.getTimestamp(TimestampType.JAIL)) + : _("true"))); + } + if(u.getData().isMuted()) + { + sender.sendMessage(_("whoisMuted", u.getTimestamp(TimestampType.MUTE) > 0 + ? DateUtil.formatDateDiff(u.getTimestamp(TimestampType.MUTE)) + : _("true"))); + } } catch (PlayerNotFoundException e) { |