mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +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);
|
||||
return;
|
||||
}
|
||||
} else if (attacker instanceof Tameable) {
|
||||
}
|
||||
if (attacker instanceof Tameable) {
|
||||
if (((Tameable) attacker).getOwner() == null) {
|
||||
if (!set.allows(DefaultFlag.MOB_DAMAGE, localPlayer)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!(((Tameable) attacker).getOwner() instanceof Player)) {
|
||||
return;
|
||||
}
|
||||
Player beastMaster = (Player) ((Tameable) attacker).getOwner();
|
||||
Vector pt2 = toVector(attacker.getLocation());
|
||||
if (!mgr.getApplicableRegions(pt2).allows(DefaultFlag.PVP, plugin.wrapPlayer(beastMaster))) {
|
||||
|
Loading…
Reference in New Issue
Block a user