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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user