mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-27 03:28:30 +01:00
[FIX] Update user activity when shooting a bow
This commit is contained in:
parent
a72777d043
commit
5e360995eb
@ -10,8 +10,8 @@ import org.bukkit.entity.*;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
|
||||||
import org.bukkit.event.entity.*;
|
import org.bukkit.event.entity.*;
|
||||||
|
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
@ -200,4 +200,12 @@ public class EssentialsEntityListener implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||||
|
public void onEntityShootBow (EntityShootBowEvent event)
|
||||||
|
{
|
||||||
|
if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isAfk())
|
||||||
|
{
|
||||||
|
ess.getUser(event.getEntity()).updateActivity(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user