Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 35 lines 792 B view raw
1package org.bukkit.event.weather; 2 3import org.bukkit.World; 4import org.bukkit.event.Cancellable; 5 6/** 7 * Stores data for weather changing in a world 8 */ 9public class WeatherChangeEvent extends WeatherEvent implements Cancellable { 10 11 private boolean canceled; 12 private boolean to; 13 14 public WeatherChangeEvent(World world, boolean to) { 15 super(Type.WEATHER_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 weather that the world is being set to 29 * 30 * @return true if the weather is being set to raining, false otherwise 31 */ 32 public boolean toWeatherState() { 33 return to; 34 } 35}