Search in sources :

Example 1 with LightningStrikeEvent

use of org.bukkit.event.weather.LightningStrikeEvent in project Glowstone by GlowstoneMC.

the class GlowWorld method strikeLightningFireEvent.

private GlowLightningStrike strikeLightningFireEvent(Location loc, boolean effect, boolean isSilent) {
    checkNotNull(loc);
    GlowLightningStrike strike = new GlowLightningStrike(loc, effect, isSilent);
    LightningStrikeEvent event = new LightningStrikeEvent(this, strike);
    if (EventFactory.getInstance().callEvent(event).isCancelled()) {
        return null;
    }
    return strike;
}
Also used : GlowLightningStrike(net.glowstone.entity.GlowLightningStrike) LightningStrikeEvent(org.bukkit.event.weather.LightningStrikeEvent)

Aggregations

GlowLightningStrike (net.glowstone.entity.GlowLightningStrike)1 LightningStrikeEvent (org.bukkit.event.weather.LightningStrikeEvent)1