Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 38 lines 858 B view raw
1package org.bukkit.event.weather; 2 3import org.bukkit.World; 4import org.bukkit.entity.LightningStrike; 5import org.bukkit.event.Cancellable; 6 7/** 8 * Stores data for lightning striking 9 */ 10public class LightningStrikeEvent extends WeatherEvent implements Cancellable { 11 12 private boolean canceled; 13 private LightningStrike bolt; 14 private World world; 15 16 public LightningStrikeEvent(World world, LightningStrike bolt) { 17 super(Type.LIGHTNING_STRIKE, world); 18 this.bolt = bolt; 19 this.world = world; 20 } 21 22 public boolean isCancelled() { 23 return canceled; 24 } 25 26 public void setCancelled(boolean cancel) { 27 canceled = cancel; 28 } 29 30 /** 31 * Gets the bolt which is striking the earth. 32 * 33 * @return lightning entity 34 */ 35 public LightningStrike getLightning() { 36 return bolt; 37 } 38}