mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Fix a few wolf issues
This commit is contained in:
parent
5085841d9d
commit
dfb6114584
@ -337,13 +337,17 @@ private void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (attacker instanceof Tameable) {
|
}
|
||||||
|
if (attacker instanceof Tameable) {
|
||||||
if (((Tameable) attacker).getOwner() == null) {
|
if (((Tameable) attacker).getOwner() == null) {
|
||||||
if (!set.allows(DefaultFlag.MOB_DAMAGE, localPlayer)) {
|
if (!set.allows(DefaultFlag.MOB_DAMAGE, localPlayer)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!(((Tameable) attacker).getOwner() instanceof Player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Player beastMaster = (Player) ((Tameable) attacker).getOwner();
|
Player beastMaster = (Player) ((Tameable) attacker).getOwner();
|
||||||
Vector pt2 = toVector(attacker.getLocation());
|
Vector pt2 = toVector(attacker.getLocation());
|
||||||
if (!mgr.getApplicableRegions(pt2).allows(DefaultFlag.PVP, plugin.wrapPlayer(beastMaster))) {
|
if (!mgr.getApplicableRegions(pt2).allows(DefaultFlag.PVP, plugin.wrapPlayer(beastMaster))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user