Files
Bukkit/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java
2011-12-25 16:02:30 +01:00

37 lines
829 B
Java

package org.bukkit.event.weather;
import org.bukkit.World;
import org.bukkit.event.Cancellable;
/**
* Stores data for thunder state changing in a world
*/
@SuppressWarnings("serial")
public class ThunderChangeEvent extends WeatherEvent implements Cancellable {
private boolean canceled;
private boolean to;
public ThunderChangeEvent(World world, boolean to) {
super(Type.THUNDER_CHANGE, world);
this.to = to;
}
public boolean isCancelled() {
return canceled;
}
public void setCancelled(boolean cancel) {
canceled = cancel;
}
/**
* Gets the state of thunder that the world is being set to
*
* @return true if the weather is being set to thundering, false otherwise
*/
public boolean toThunderState() {
return to;
}
}