Format /seen account history list, optimize map loading.

This commit is contained in:
KHobbits 2014-04-18 05:57:47 +01:00
parent b080187808
commit b6c0871daa
29 changed files with 95 additions and 33 deletions

View file

@ -74,9 +74,9 @@ public class Commandseen extends EssentialsCommand
sender.sendMessage(tl("seenOnline", user.getDisplayName(), DateUtil.formatDateDiff(user.getLastLogin())));
List<String> history = ess.getUserMap().getUserHistory(user.getBase().getUniqueId());
if (history.size() > 1)
if (history != null && history.size() > 1)
{
sender.sendMessage("User has also been known as: " + StringUtil.joinList(history)); //TODO: TL
sender.sendMessage(tl("seenAccounts", StringUtil.joinListSkip(", ", user.getName(), history)));
}
if (user.isAfk())
@ -119,9 +119,9 @@ public class Commandseen extends EssentialsCommand
}
List<String> history = ess.getUserMap().getUserHistory(user.getBase().getUniqueId());
if (history.size() > 1)
if (history != null && history.size() > 1)
{
sender.sendMessage("User has also been known as: " + StringUtil.joinList(history)); //TODO: TL
sender.sendMessage(tl("seenAccounts", StringUtil.joinListSkip(", ", user.getName(), history)));
}
if (user.getBase().isBanned())