Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 35 lines 801 B view raw
1package org.bukkit.event.weather; 2 3import org.bukkit.World; 4import org.bukkit.event.Cancellable; 5 6/** 7 * Stores data for thunder state changing in a world 8 */ 9public class ThunderChangeEvent extends WeatherEvent implements Cancellable { 10 11 private boolean canceled; 12 private boolean to; 13 14 public ThunderChangeEvent(World world, boolean to) { 15 super(Type.THUNDER_CHANGE, world); 16 this.to = to; 17 } 18 19 public boolean isCancelled() { 20 return canceled; 21 } 22 23 public void setCancelled(boolean cancel) { 24 canceled = cancel; 25 } 26 27 /** 28 * Gets the state of thunder that the world is being set to 29 * 30 * @return true if the weather is being set to thundering, false otherwise 31 */ 32 public boolean toThunderState() { 33 return to; 34 } 35}