diff options
author | Zenexer <Zenexer@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-30 04:03:21 +0000 |
---|---|---|
committer | Zenexer <Zenexer@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-30 04:03:21 +0000 |
commit | 71c5e8c54eb51e8eb8176f807a6205abdd02f5ae (patch) | |
tree | 1c750b9fa65224abc02ba4db9b569bba979fa5d1 /EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java | |
download | Essentials-71c5e8c54eb51e8eb8176f807a6205abdd02f5ae.tar Essentials-71c5e8c54eb51e8eb8176f807a6205abdd02f5ae.tar.gz Essentials-71c5e8c54eb51e8eb8176f807a6205abdd02f5ae.tar.lz Essentials-71c5e8c54eb51e8eb8176f807a6205abdd02f5ae.tar.xz Essentials-71c5e8c54eb51e8eb8176f807a6205abdd02f5ae.zip |
2.1 prerelease, part 2 of 3
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk2.1@1015 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java new file mode 100644 index 000000000..e351cc865 --- /dev/null +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java @@ -0,0 +1,61 @@ +package com.earth2me.essentials.chat; + +import com.earth2me.essentials.Essentials; +import org.bukkit.Server; +import org.bukkit.event.player.*; + + +public class EssentialsChatPlayerListener extends PlayerListener +{ + private final Server server; + + public EssentialsChatPlayerListener(Server server) + { + this.server = server; + } + + @Override + @SuppressWarnings("CallToThreadDumpStack") + public void onPlayerJoin(PlayerJoinEvent event) + { + try + { + Essentials.loadClasses(); + EssentialsChatWorker.onPlayerJoin(server, event); + } + catch (Throwable ex) + { + ex.printStackTrace(); + } + } + + @Override + @SuppressWarnings("CallToThreadDumpStack") + public void onPlayerRespawn(PlayerRespawnEvent event) + { + try + { + Essentials.loadClasses(); + EssentialsChatWorker.onPlayerRespawn(server, event); + } + catch (Throwable ex) + { + ex.printStackTrace(); + } + } + + @Override + @SuppressWarnings("CallToThreadDumpStack") + public void onPlayerChat(PlayerChatEvent event) + { + try + { + Essentials.loadClasses(); + EssentialsChatWorker.onPlayerChat(server, event); + } + catch (Throwable ex) + { + ex.printStackTrace(); + } + } +} |