summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-10-23 21:51:38 +0100
committerKHobbits <rob@khobbits.co.uk>2011-10-23 21:51:38 +0100
commit6974abea28233fd6118567841dad4e3af0a43d4b (patch)
tree847da13c1293ece6f7bd041fa1c68e882334c003
parent9433acf6896eeea49e4c72a4acdf11cc619f8d44 (diff)
downloadEssentials-6974abea28233fd6118567841dad4e3af0a43d4b.tar
Essentials-6974abea28233fd6118567841dad4e3af0a43d4b.tar.gz
Essentials-6974abea28233fd6118567841dad4e3af0a43d4b.tar.lz
Essentials-6974abea28233fd6118567841dad4e3af0a43d4b.tar.xz
Essentials-6974abea28233fd6118567841dad4e3af0a43d4b.zip
Automatically unAFK on interaction.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
index 083fa1687..063a9d61b 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java
@@ -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())
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index 9147acaf0..3205d4d91 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -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);
}