diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-09-09 06:36:14 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-09-09 06:36:14 +0100 |
commit | b4fc91db39d0f4b36b77883021908bf08923b095 (patch) | |
tree | 41c3eac8e086d22cd9f93a996eec8d9e78a6aa0b /EssentialsChat/src | |
parent | 8f22262d92171775288405693967873d179582ba (diff) | |
download | Essentials-b4fc91db39d0f4b36b77883021908bf08923b095.tar Essentials-b4fc91db39d0f4b36b77883021908bf08923b095.tar.gz Essentials-b4fc91db39d0f4b36b77883021908bf08923b095.tar.lz Essentials-b4fc91db39d0f4b36b77883021908bf08923b095.tar.xz Essentials-b4fc91db39d0f4b36b77883021908bf08923b095.zip |
If chat event doesn't resolve to valid player, cancel and exit.
Diffstat (limited to 'EssentialsChat/src')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index 410dc3b3b..e8fee2fbb 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -32,6 +32,12 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer } final User user = ess.getUser(event.getPlayer()); + + if (user == null) { + event.setCancelled(true); + return; + } + final ChatStore chatStore = new ChatStore(ess, user, getChatType(event.getMessage())); setChatStore(event, chatStore); |