1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 20:41:37 +02:00

[PORT] port "update user activity on firing a bow" to 3.x

This commit is contained in:
Iaccidentally
2013-04-16 16:18:06 -04:00
parent 1b8b6e2d0b
commit dc61159009

View File

@@ -208,4 +208,16 @@ public class EssentialsEntityListener implements Listener
}
}
}
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityShootBow (EntityShootBowEvent event)
{
if (event.getEntity() instanceof Player)
{
final IUser user = ess.getUserMap().getUser((Player)event.getEntity());
if (user.getData().isAfk())
{
user.updateActivity(true);
}
}
}
}