mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Add a little bit of extra information to /seen, this will show when user is online.
This commit is contained in:
parent
10b972bd07
commit
ce78125028
@ -35,12 +35,23 @@ public class Commandseen extends EssentialsCommand
|
||||
}
|
||||
try
|
||||
{
|
||||
User player = getPlayer(server, args, 0);
|
||||
player.setDisplayNick();
|
||||
sender.sendMessage(_("seenOnline", player.getDisplayName(), Util.formatDateDiff(player.getLastLogin())));
|
||||
User user = getPlayer(server, args, 0);
|
||||
user.setDisplayNick();
|
||||
sender.sendMessage(_("seenOnline", user.getDisplayName(), Util.formatDateDiff(user.getLastLogin())));
|
||||
sender.sendMessage(_("whoisAFK", (user.isAfk() ? _("true") : _("false"))));
|
||||
sender.sendMessage(_("whoisJail", (user.isJailed()
|
||||
? user.getJailTimeout() > 0
|
||||
? Util.formatDateDiff(user.getJailTimeout())
|
||||
: _("true")
|
||||
: _("false"))));
|
||||
sender.sendMessage(_("whoisMuted", (user.isMuted()
|
||||
? user.getMuteTimeout() > 0
|
||||
? Util.formatDateDiff(user.getMuteTimeout())
|
||||
: _("true")
|
||||
: _("false"))));
|
||||
if (extra)
|
||||
{
|
||||
sender.sendMessage(_("whoisIPAddress", player.getAddress().getAddress().toString()));
|
||||
sender.sendMessage(_("whoisIPAddress", user.getAddress().getAddress().toString()));
|
||||
}
|
||||
}
|
||||
catch (NoSuchFieldException e)
|
||||
|
Loading…
Reference in New Issue
Block a user