diff options
author | snowleo <schneeleo@gmail.com> | 2012-01-20 05:20:37 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-01-20 05:20:37 +0100 |
commit | 792f70efa5f3a47f642360e97979fe841593384c (patch) | |
tree | bf119f53a3426f1016457d066820eb334eb393ac /EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java | |
parent | 46298ae85895574a097b1dd10c46196ffa1a42d3 (diff) | |
download | Essentials-792f70efa5f3a47f642360e97979fe841593384c.tar Essentials-792f70efa5f3a47f642360e97979fe841593384c.tar.gz Essentials-792f70efa5f3a47f642360e97979fe841593384c.tar.lz Essentials-792f70efa5f3a47f642360e97979fe841593384c.tar.xz Essentials-792f70efa5f3a47f642360e97979fe841593384c.zip |
Update for new CraftBukkit Event Code
EssentialsSpawn can't be updated yet, because the new event system lacks dynamic priorities.
Diffstat (limited to 'EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java')
-rw-r--r-- | EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java index 47966aee0..1fa5a243c 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java @@ -2,13 +2,15 @@ package com.earth2me.essentials.xmpp; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerListener; import org.bukkit.event.player.PlayerQuitEvent; -class EssentialsXMPPPlayerListener extends PlayerListener +class EssentialsXMPPPlayerListener implements Listener { private final transient IEssentials ess; @@ -18,21 +20,21 @@ class EssentialsXMPPPlayerListener extends PlayerListener this.ess = ess; } - @Override + @EventHandler(priority= EventPriority.MONITOR) public void onPlayerJoin(final PlayerJoinEvent event) { final User user = ess.getUser(event.getPlayer()); sendMessageToSpyUsers("Player " + user.getDisplayName() + " joined the game"); } - @Override + @EventHandler(priority= EventPriority.MONITOR) public void onPlayerChat(final PlayerChatEvent event) { final User user = ess.getUser(event.getPlayer()); sendMessageToSpyUsers(String.format(event.getFormat(), user.getDisplayName(), event.getMessage())); } - @Override + @EventHandler(priority= EventPriority.MONITOR) public void onPlayerQuit(final PlayerQuitEvent event) { final User user = ess.getUser(event.getPlayer()); |