
org.bukkit.event.weather.LightningStrikeEvent 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.entity.LightningStrike;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Stores data for lightning striking
*/
public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final LightningStrike bolt;
private boolean canceled;
public LightningStrikeEvent(final World world, final LightningStrike bolt) {
super(world);
this.bolt = bolt;
}
public static HandlerList getHandlerList() {
return handlers;
}
public boolean isCancelled() {
return canceled;
}
public void setCancelled(boolean cancel) {
canceled = cancel;
}
/**
* Gets the bolt which is striking the earth.
*
* @return lightning entity
*/
public LightningStrike getLightning() {
return bolt;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy