1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 01:25:26 +02:00

Another NPE fix for bots

This commit is contained in:
Alexander Schepp
2012-07-10 15:56:12 +03:00
parent 272988299c
commit fbd83d527b

View File

@@ -40,8 +40,8 @@ public class KeywordReplacer implements IText
user.setDisplayNick();
displayName = user.getDisplayName();
userName = user.getName();
ipAddress = user.getAddress().getAddress().toString();
address = user.getAddress().toString();
ipAddress = user.getAddress() == null || user.getAddress().getAddress() == null ? "" : user.getAddress().getAddress().toString();
address = user.getAddress() == null ? "" : user.getAddress().toString();
balance = Double.toString(user.getMoney());
mails = Integer.toString(user.getMails().size());
world = user.getLocation() == null || user.getLocation().getWorld() == null ? "" : user.getLocation().getWorld().getName();