GPFlags: Allow pets be damaged in AllowPvP zones.
This commit is contained in:
parent
faccc26572
commit
c52f0b4da2
|
|
@ -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);
|
||||||
|
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);
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//and disallow if attacker is pvp immune
|
//and disallow if attacker is pvp immune
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user