cn.nukkit.entity.weather.EntityLightningStrike Java Examples

The following examples show how to use cn.nukkit.entity.weather.EntityLightningStrike. 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: EntityCreeper.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
public void setPowered(EntityLightningStrike bolt) {
    CreeperPowerEvent ev = new CreeperPowerEvent(this, bolt, CreeperPowerEvent.PowerCause.LIGHTNING);
    this.getServer().getPluginManager().callEvent(ev);

    if (!ev.isCancelled()) {
        this.setDataProperty(new ByteEntityData(DATA_POWERED, 1));
        this.namedTag.putBoolean("powered", true);
    }
}
 
Example #2
Source File: EntityCreeper.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public void setPowered(EntityLightningStrike bolt) {
    CreeperPowerEvent ev = new CreeperPowerEvent(this, bolt, CreeperPowerEvent.PowerCause.LIGHTNING);
    this.getServer().getPluginManager().callEvent(ev);

    if (!ev.isCancelled()) {
        this.setDataProperty(new ByteEntityData(DATA_POWERED, 1));
        this.namedTag.putBoolean("powered", true);
    }
}
 
Example #3
Source File: EntityCreeper.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
public void setPowered(EntityLightningStrike bolt) {
    CreeperPowerEvent ev = new CreeperPowerEvent(this, bolt, CreeperPowerEvent.PowerCause.LIGHTNING);
    this.getServer().getPluginManager().callEvent(ev);

    if (!ev.isCancelled()) {
        this.setDataProperty(new ByteEntityData(DATA_POWERED, 1));
        this.namedTag.putBoolean("powered", true);
    }
}
 
Example #4
Source File: CreeperPowerEvent.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
public CreeperPowerEvent(final EntityCreeper creeper, final EntityLightningStrike bolt, final PowerCause cause) {
    this(creeper, cause);
    this.bolt = bolt;
}
 
Example #5
Source File: LightningStrikeEvent.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
public LightningStrikeEvent(Level level, final EntityLightningStrike bolt) {
    super(level);
    this.bolt = bolt;
}
 
Example #6
Source File: CreeperPowerEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public CreeperPowerEvent(final EntityCreeper creeper, final EntityLightningStrike bolt, final PowerCause cause) {
    this(creeper, cause);
    this.bolt = bolt;
}
 
Example #7
Source File: LightningStrikeEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public LightningStrikeEvent(Level level, final EntityLightningStrike bolt) {
    super(level);
    this.bolt = bolt;
}
 
Example #8
Source File: CreeperPowerEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public CreeperPowerEvent(final EntityCreeper creeper, final EntityLightningStrike bolt, final PowerCause cause) {
    this(creeper, cause);
    this.bolt = bolt;
}
 
Example #9
Source File: LightningStrikeEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public LightningStrikeEvent(Level level, final EntityLightningStrike bolt) {
    super(level);
    this.bolt = bolt;
}
 
Example #10
Source File: CreeperPowerEvent.java    From Jupiter with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Gets the lightning bolt which is striking the Creeper.
 *
 * @return The Entity for the lightning bolt which is striking the Creeper
 */
public EntityLightningStrike getLightning() {
    return bolt;
}
 
Example #11
Source File: LightningStrikeEvent.java    From Jupiter with GNU General Public License v3.0 2 votes vote down vote up
/**
 * * Gets the bolt which is striking the earth.
 * * @return lightning entity
 */
public EntityLightningStrike getLightning() {
    return bolt;
}
 
Example #12
Source File: CreeperPowerEvent.java    From Nukkit with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Gets the lightning bolt which is striking the Creeper.
 *
 * @return The Entity for the lightning bolt which is striking the Creeper
 */
public EntityLightningStrike getLightning() {
    return bolt;
}
 
Example #13
Source File: LightningStrikeEvent.java    From Nukkit with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Gets the bolt which is striking the earth.
 * @return lightning entity
 */
public EntityLightningStrike getLightning() {
    return bolt;
}
 
Example #14
Source File: CreeperPowerEvent.java    From Nukkit with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Gets the lightning bolt which is striking the Creeper.
 *
 * @return The Entity for the lightning bolt which is striking the Creeper
 */
public EntityLightningStrike getLightning() {
    return bolt;
}
 
Example #15
Source File: LightningStrikeEvent.java    From Nukkit with GNU General Public License v3.0 2 votes vote down vote up
/**
 * * Gets the bolt which is striking the earth.
 * * @return lightning entity
 */
public EntityLightningStrike getLightning() {
    return bolt;
}