summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-06-19 09:03:37 +0100
committerKHobbits <rob@khobbits.co.uk>2012-06-19 09:03:37 +0100
commit65025d47c53597586c7596c4dcaeeb58102406b8 (patch)
tree9d07e45ce6e4fe498669ca6f6d0e34ccb17e80ae
parent4f23e8aaebf77e6d4503b1f5ee18e632da7d4d42 (diff)
downloadEssentials-65025d47c53597586c7596c4dcaeeb58102406b8.tar
Essentials-65025d47c53597586c7596c4dcaeeb58102406b8.tar.gz
Essentials-65025d47c53597586c7596c4dcaeeb58102406b8.tar.lz
Essentials-65025d47c53597586c7596c4dcaeeb58102406b8.tar.xz
Essentials-65025d47c53597586c7596c4dcaeeb58102406b8.zip
Little safety check for bad plugins.
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index 3835905e6..76ed79277 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -457,11 +457,15 @@ public abstract class UserData extends PlayerExtension implements IConf
}
config.save();
}
-
+
@Deprecated
public boolean isIgnoredPlayer(final String userName)
{
final IUser user = ess.getUser(userName);
+ if (user == null || !user.isOnline())
+ {
+ return false;
+ }
return (ignoredPlayers.contains(user.getName().toLowerCase(Locale.ENGLISH)) && !user.isAuthorized("essentials.chat.ignoreexempt"));
}