Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
LightningStrikeEvent.java
1 package org.bukkit.event.weather;
2 
3 import org.bukkit.World;
7 
8 /**
9  * Stores data for lightning striking
10  */
11 public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
12  private static final HandlerList handlers = new HandlerList();
13  private boolean canceled;
14  private final LightningStrike bolt;
15 
16  public LightningStrikeEvent(final World world, final LightningStrike bolt) {
17  super(world);
18  this.bolt = bolt;
19  }
20 
21  public boolean isCancelled() {
22  return canceled;
23  }
24 
25  public void setCancelled(boolean cancel) {
26  canceled = cancel;
27  }
28 
29  /**
30  * Gets the bolt which is striking the earth.
31  *
32  * @return lightning entity
33  */
35  return bolt;
36  }
37 
38  @Override
39  public HandlerList getHandlers() {
40  return handlers;
41  }
42 
43  public static HandlerList getHandlerList() {
44  return handlers;
45  }
46 }