[FIX] Update user activity when shooting a bow

This commit is contained in:
Iaccidentally 2013-04-16 15:58:13 -04:00
parent a72777d043
commit 5e360995eb

View File

@ -10,8 +10,8 @@ import org.bukkit.entity.*;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.event.entity.*; import org.bukkit.event.entity.*;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.inventory.ItemStack; 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);
}
}
} }