Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
ThunderChangeEvent.java
1 package org.bukkit.event.weather;
2 
3 import org.bukkit.World;
6 
7 /**
8  * Stores data for thunder state changing in a world
9  */
10 public class ThunderChangeEvent extends WeatherEvent implements Cancellable {
11  private static final HandlerList handlers = new HandlerList();
12  private boolean canceled;
13  private final boolean to;
14 
15  public ThunderChangeEvent(final World world, final boolean to) {
16  super(world);
17  this.to = to;
18  }
19 
20  public boolean isCancelled() {
21  return canceled;
22  }
23 
24  public void setCancelled(boolean cancel) {
25  canceled = cancel;
26  }
27 
28  /**
29  * Gets the state of thunder that the world is being set to
30  *
31  * @return true if the weather is being set to thundering, false otherwise
32  */
33  public boolean toThunderState() {
34  return to;
35  }
36 
37  @Override
38  public HandlerList getHandlers() {
39  return handlers;
40  }
41 
42  public static HandlerList getHandlerList() {
43  return handlers;
44  }
45 }