parent
a0440733ed
commit
c4a0012959
|
|
@ -632,9 +632,9 @@ public class BlockEventHandler implements Listener
|
||||||
if(!GriefPrevention.instance.claimsEnabledForWorld(igniteEvent.getBlock().getWorld())) return;
|
if(!GriefPrevention.instance.claimsEnabledForWorld(igniteEvent.getBlock().getWorld())) return;
|
||||||
|
|
||||||
if(igniteEvent.getCause() == IgniteCause.LIGHTNING && GriefPrevention.instance.dataStore.getClaimAt(igniteEvent.getIgnitingEntity().getLocation(), false, null) != null){
|
if(igniteEvent.getCause() == IgniteCause.LIGHTNING && GriefPrevention.instance.dataStore.getClaimAt(igniteEvent.getIgnitingEntity().getLocation(), false, null) != null){
|
||||||
if(igniteEvent.getIgnitingEntity().hasMetadata("GP_TRIDENT")){
|
// if(igniteEvent.getIgnitingEntity().hasMetadata("GP_TRIDENT")){ //BlockIgniteEvent is called before LightningStrikeEvent. See #532
|
||||||
igniteEvent.setCancelled(true);
|
igniteEvent.setCancelled(true);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!GriefPrevention.instance.config_fireSpreads && igniteEvent.getCause() != IgniteCause.FLINT_AND_STEEL && igniteEvent.getCause() != IgniteCause.LIGHTNING)
|
if(!GriefPrevention.instance.config_fireSpreads && igniteEvent.getCause() != IgniteCause.FLINT_AND_STEEL && igniteEvent.getCause() != IgniteCause.LIGHTNING)
|
||||||
|
|
|
||||||
|
|
@ -719,8 +719,10 @@ public class EntityEventHandler implements Listener
|
||||||
|
|
||||||
EntityDamageByEntityEvent subEvent = (EntityDamageByEntityEvent) event;
|
EntityDamageByEntityEvent subEvent = (EntityDamageByEntityEvent) event;
|
||||||
|
|
||||||
if(subEvent.getDamager() instanceof LightningStrike && subEvent.getDamager().getMetadata("GP_TRIDENT").size() >= 1){
|
if(subEvent.getDamager() instanceof LightningStrike && subEvent.getDamager().hasMetadata("GP_TRIDENT"))
|
||||||
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
//determine which player is attacking, if any
|
//determine which player is attacking, if any
|
||||||
Player attacker = null;
|
Player attacker = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user