
org.bukkit.event.weather.ThunderChangeEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of walk-server Show documentation
Show all versions of walk-server Show documentation
A spigot fork to kotlin structure and news.
package org.bukkit.event.weather;
import org.bukkit.World;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Stores data for thunder state changing in a world
*/
public class ThunderChangeEvent extends WeatherEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final boolean to;
private boolean canceled;
public ThunderChangeEvent(final World world, final boolean to) {
super(world);
this.to = to;
}
public static HandlerList getHandlerList() {
return handlers;
}
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;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy