mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-12 19:31:05 +01:00
Automatically unAFK on interaction.
This commit is contained in:
parent
9433acf689
commit
6974abea28
@ -34,6 +34,7 @@ public class EssentialsEntityListener extends EntityListener
|
|||||||
{
|
{
|
||||||
User defender = ess.getUser(eDefend);
|
User defender = ess.getUser(eDefend);
|
||||||
User attacker = ess.getUser(eAttack);
|
User attacker = ess.getUser(eAttack);
|
||||||
|
attacker.updateActivity(true);
|
||||||
ItemStack is = attacker.getItemInHand();
|
ItemStack is = attacker.getItemInHand();
|
||||||
List<String> commandList = attacker.getPowertool(is);
|
List<String> commandList = attacker.getPowertool(is);
|
||||||
if (commandList != null && !commandList.isEmpty())
|
if (commandList != null && !commandList.isEmpty())
|
||||||
|
@ -319,6 +319,8 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerAnimation(final PlayerAnimationEvent event)
|
public void onPlayerAnimation(final PlayerAnimationEvent event)
|
||||||
{
|
{
|
||||||
|
final User user = ess.getUser(event.getPlayer());
|
||||||
|
user.updateActivity(true);
|
||||||
usePowertools(event);
|
usePowertools(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user