1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-01-18 13:56:29 +01:00

Automatically unAFK on interaction.

This commit is contained in:
KHobbits 2011-10-23 21:51:38 +01:00
parent 7888471982
commit 443ae7fcce
2 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@ public class EssentialsEntityListener extends EntityListener
{
User defender = ess.getUser(eDefend);
User attacker = ess.getUser(eAttack);
attacker.updateActivity(true);
ItemStack is = attacker.getItemInHand();
List<String> commandList = attacker.getPowertool(is);
if (commandList != null && !commandList.isEmpty())

View File

@ -319,6 +319,8 @@ public class EssentialsPlayerListener extends PlayerListener
@Override
public void onPlayerAnimation(final PlayerAnimationEvent event)
{
final User user = ess.getUser(event.getPlayer());
user.updateActivity(true);
usePowertools(event);
}