diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java index 1bdf82445..67cc8f067 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java @@ -10,8 +10,8 @@ import org.bukkit.entity.*; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.entity.*; +import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.inventory.ItemStack; @@ -200,4 +200,12 @@ public class EssentialsEntityListener implements Listener } } } + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) + public void onEntityShootBow (EntityShootBowEvent event) + { + if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isAfk()) + { + ess.getUser(event.getEntity()).updateActivity(true); + } + } }