remove unused lightning strike event handler

This commit is contained in:
RoboMWM 2021-01-19 17:29:53 -08:00
parent 6ac16665b3
commit 83e89b3772
2 changed files with 1 additions and 10 deletions

View File

@ -720,9 +720,7 @@ public class BlockEventHandler implements Listener
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")){ //BlockIgniteEvent is called before LightningStrikeEvent. See #532 igniteEvent.setCancelled(true); //BlockIgniteEvent is called before LightningStrikeEvent. See #532. However, see #1125 for further discussion on detecting trident-caused lightning.
igniteEvent.setCancelled(true);
// }
} }
// If a fire is started by a fireball from a dispenser, allow it if the dispenser is in the same claim. // If a fire is started by a fireball from a dispenser, allow it if the dispenser is in the same claim.

View File

@ -133,13 +133,6 @@ public class EntityEventHandler implements Listener
} }
} }
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onLightningStrike(LightningStrikeEvent event)
{
if (event.getCause() == LightningStrikeEvent.Cause.TRIDENT)
event.getLightning().setMetadata("GP_TRIDENT", new FixedMetadataValue(GriefPrevention.instance, event.getLightning().getLocation()));
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST) @EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
public void onEntityChangeBLock(EntityChangeBlockEvent event) public void onEntityChangeBLock(EntityChangeBlockEvent event)
{ {