diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-19 22:39:51 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-03-19 22:39:51 +0000 |
commit | a3ebd254f2897951a2ce31fdd90b6944c582d82b (patch) | |
tree | 11c8670882eed130d7ff1b33cc7c65e496f1bbac /EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java | |
parent | 487577f2fa856a61077594ad6677f0bdd7150fcd (diff) | |
download | Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.gz Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.lz Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.tar.xz Essentials-a3ebd254f2897951a2ce31fdd90b6944c582d82b.zip |
Moving all files to trunk.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@969 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 | 64 |
1 files changed, 64 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..890187ee3 --- /dev/null +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java @@ -0,0 +1,64 @@ +package com.earth2me.essentials.chat; + +import com.earth2me.essentials.Essentials; +import org.bukkit.Server; +import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.PlayerEvent; +import org.bukkit.event.player.PlayerListener; +import org.bukkit.event.player.PlayerRespawnEvent; + + +public class EssentialsChatPlayerListener extends PlayerListener +{ + private final Server server; + + public EssentialsChatPlayerListener(Server server) + { + this.server = server; + } + + @Override + @SuppressWarnings("CallToThreadDumpStack") + public void onPlayerJoin(PlayerEvent 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(); + } + } +} |