summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIaccidentally <coryhuckaby@gmail.com>2012-11-11 11:43:10 -0500
committerIaccidentally <coryhuckaby@gmail.com>2012-11-11 11:43:10 -0500
commita1ce340ce0788b639a14e1df9a4b373f2879a8ca (patch)
tree3548fa148df071c07553a26d5b9c716cab0a7bb2
parentf52e0ae7a8cff550f30707da8172dd501e84b7c6 (diff)
downloadEssentials-a1ce340ce0788b639a14e1df9a4b373f2879a8ca.tar
Essentials-a1ce340ce0788b639a14e1df9a4b373f2879a8ca.tar.gz
Essentials-a1ce340ce0788b639a14e1df9a4b373f2879a8ca.tar.lz
Essentials-a1ce340ce0788b639a14e1df9a4b373f2879a8ca.tar.xz
Essentials-a1ce340ce0788b639a14e1df9a4b373f2879a8ca.zip
Make playerFishEvent cancel AFK :: fixes #3192
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index ae024da9c..d182c5656 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -23,8 +23,8 @@ import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
-import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.*;
+import org.bukkit.event.player.PlayerLoginEvent.Result;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
@@ -553,4 +553,11 @@ public class EssentialsPlayerListener implements Listener
user.setEnderSee(false);
}
}
+
+ @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
+ public void onPlayerFishEvent(final PlayerFishEvent event)
+ {
+ final User user = ess.getUser(event.getPlayer());
+ user.updateActivity(true);
+ }
} \ No newline at end of file