mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #1929
This commit is contained in:
parent
9a7ce84e1c
commit
59e06c2319
@ -2378,6 +2378,10 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (shooter instanceof Player) { // shooter is player
|
if (shooter instanceof Player) { // shooter is player
|
||||||
player = (Player) shooter;
|
player = (Player) shooter;
|
||||||
} else { // shooter is not player
|
} else { // shooter is not player
|
||||||
|
if (shooter instanceof BlockProjectileSource) {
|
||||||
|
Location sLoc = BukkitUtil.getLocation(((BlockProjectileSource) shooter).getBlock().getLocation());
|
||||||
|
dplot = dArea.getPlot(sLoc);
|
||||||
|
}
|
||||||
player = null;
|
player = null;
|
||||||
}
|
}
|
||||||
} else { // Attacker is not player
|
} else { // Attacker is not player
|
||||||
@ -2452,6 +2456,8 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} else if (dplot != null && (!(dplot.equals(vplot)) || (vplot != null && dplot.isOwner(vplot.owner)))) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
// player is null
|
// player is null
|
||||||
return !(damager instanceof Arrow && !(victim instanceof Creature));
|
return !(damager instanceof Arrow && !(victim instanceof Creature));
|
||||||
|
Loading…
Reference in New Issue
Block a user