org.bukkit.entity.LightningStrike Java Examples
The following examples show how to use
org.bukkit.entity.LightningStrike.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityZapEvent.java From Kettle with GNU General Public License v3.0 | 5 votes |
public EntityZapEvent(final Entity entity, @Nonnull final LightningStrike bolt, @Nonnull final Entity replacementEntity) { super(entity); Validate.notNull(bolt); Validate.notNull(replacementEntity); this.bolt = bolt; this.replacementEntity = replacementEntity; }
Example #2
Source File: AsyncWorld.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public LightningStrike strikeLightning(final Location loc) { return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() { @Override public void run(LightningStrike value) { this.value = parent.strikeLightning(loc); } }); }
Example #3
Source File: AsyncWorld.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public LightningStrike strikeLightningEffect(final Location loc) { return TaskManager.IMP.sync(new RunnableVal<LightningStrike>() { @Override public void run(LightningStrike value) { this.value = parent.strikeLightningEffect(loc); } }); }
Example #4
Source File: CreeperPowerEvent.java From Kettle with GNU General Public License v3.0 | 4 votes |
public CreeperPowerEvent(final Creeper creeper, final LightningStrike bolt, final PowerCause cause) { this(creeper, cause); this.bolt = bolt; }
Example #5
Source File: PigZapEvent.java From Kettle with GNU General Public License v3.0 | 4 votes |
public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) { super(pig); this.bolt = bolt; this.pigzombie = pigzombie; }
Example #6
Source File: LightningStrikeEvent.java From Kettle with GNU General Public License v3.0 | 4 votes |
public LightningStrikeEvent(final World world, final LightningStrike bolt) { super(world); this.bolt = bolt; }
Example #7
Source File: CraftLightningStrike.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public LightningStrike.Spigot spigot() { return spigot; }
Example #8
Source File: PlayerDamageListener.java From UhcCore with GNU General Public License v3.0 | 4 votes |
private void handleLightningStrike(EntityDamageByEntityEvent event){ if(event.getDamager() instanceof LightningStrike && event.getEntity() instanceof Player){ event.setCancelled(true); } }
Example #9
Source File: CraftEventFactory.java From Thermos with GNU General Public License v3.0 | 4 votes |
public static PigZapEvent callPigZapEvent(net.minecraft.entity.Entity pig, net.minecraft.entity.Entity lightning, net.minecraft.entity.Entity pigzombie) { PigZapEvent event = new PigZapEvent((Pig) pig.getBukkitEntity(), (LightningStrike) lightning.getBukkitEntity(), (PigZombie) pigzombie.getBukkitEntity()); pig.getBukkitEntity().getServer().getPluginManager().callEvent(event); return event; }
Example #10
Source File: CraftEventFactory.java From Thermos with GNU General Public License v3.0 | 4 votes |
public static CreeperPowerEvent callCreeperPowerEvent(net.minecraft.entity.Entity creeper, net.minecraft.entity.Entity lightning, CreeperPowerEvent.PowerCause cause) { CreeperPowerEvent event = new CreeperPowerEvent((Creeper) creeper.getBukkitEntity(), (LightningStrike) lightning.getBukkitEntity(), cause); creeper.getBukkitEntity().getServer().getPluginManager().callEvent(event); return event; }
Example #11
Source File: CreeperPowerEvent.java From Kettle with GNU General Public License v3.0 | 2 votes |
/** * Gets the lightning bolt which is striking the Creeper. * * @return The Entity for the lightning bolt which is striking the Creeper */ public LightningStrike getLightning() { return bolt; }
Example #12
Source File: PigZapEvent.java From Kettle with GNU General Public License v3.0 | 2 votes |
/** * Gets the bolt which is striking the pig. * * @return lightning entity */ public LightningStrike getLightning() { return bolt; }
Example #13
Source File: LightningStrikeEvent.java From Kettle with GNU General Public License v3.0 | 2 votes |
/** * Gets the bolt which is striking the earth. * * @return lightning entity */ public LightningStrike getLightning() { return bolt; }
Example #14
Source File: EntityZapEvent.java From Kettle with GNU General Public License v3.0 | 2 votes |
/** * Gets the lightning bolt that is striking the entity. * * @return The lightning bolt responsible for this event */ @Nonnull public LightningStrike getBolt() { return bolt; }