GPFlags: Allow pets be damaged in AllowPvP zones.

This commit is contained in:
ryanhamshire 2016-06-03 21:27:47 -07:00
parent faccc26572
commit c52f0b4da2

View File

@ -864,7 +864,12 @@ public class EntityEventHandler implements Listener
if(attacker.hasPermission("griefprevention.ignoreclaims")) if(attacker.hasPermission("griefprevention.ignoreclaims"))
message += " " + GriefPrevention.instance.dataStore.getMessage(Messages.IgnoreClaimsAdvertisement); message += " " + GriefPrevention.instance.dataStore.getMessage(Messages.IgnoreClaimsAdvertisement);
GriefPrevention.sendMessage(attacker, TextMode.Err, message); GriefPrevention.sendMessage(attacker, TextMode.Err, message);
event.setCancelled(true); PreventPvPEvent pvpEvent = new PreventPvPEvent(new Claim(subEvent.getEntity().getLocation(), subEvent.getEntity().getLocation(), null, new ArrayList<String>(), new ArrayList<String>(), new ArrayList<String>(), new ArrayList<String>(), null));
Bukkit.getPluginManager().callEvent(pvpEvent);
if(!pvpEvent.isCancelled())
{
event.setCancelled(true);
}
return; return;
} }
//and disallow if attacker is pvp immune //and disallow if attacker is pvp immune