mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 13:45:14 +01:00
This commit is contained in:
parent
21aa1691a5
commit
736ba10c53
@ -67,7 +67,7 @@ public class HurtingListener extends AbstractFlagListener {
|
||||
* @param damager
|
||||
* @param hurtMobs
|
||||
*/
|
||||
private void respond(Event event, Entity damager, Flag hurtMobs) {
|
||||
private void respond(EntityDamageByEntityEvent event, Entity damager, Flag hurtMobs) {
|
||||
// Get the attacker
|
||||
if (damager instanceof Player) {
|
||||
setUser(User.getInstance(damager)).checkIsland(event, damager.getLocation(), hurtMobs);
|
||||
@ -76,12 +76,11 @@ public class HurtingListener extends AbstractFlagListener {
|
||||
Projectile p = (Projectile) damager;
|
||||
if (p.getShooter() instanceof Player) {
|
||||
if (!setUser(User.getInstance((Player)p.getShooter())).checkIsland(event, damager.getLocation(), hurtMobs)) {
|
||||
damager.setFireTicks(0);
|
||||
event.getEntity().setFireTicks(0);
|
||||
damager.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user