Search in sources :

Example 1 with LightningStrike

use of org.bukkit.entity.LightningStrike in project Essentials by EssentialsX.

the class Commandlightning method updatePlayer.

@Override
protected void updatePlayer(final Server server, final CommandSource sender, final User matchUser, final String[] args) {
    sender.sendMessage(tl("lightningUse", matchUser.getDisplayName()));
    final LightningStrike strike = matchUser.getBase().getWorld().strikeLightningEffect(matchUser.getBase().getLocation());
    if (!matchUser.isGodModeEnabled()) {
        matchUser.getBase().damage(power, strike);
    }
    if (ess.getSettings().warnOnSmite()) {
        matchUser.sendMessage(tl("lightningSmited"));
    }
}
Also used : LightningStrike(org.bukkit.entity.LightningStrike)

Example 2 with LightningStrike

use of org.bukkit.entity.LightningStrike in project Essentials by drtshock.

the class Commandlightning method updatePlayer.

@Override
protected void updatePlayer(final Server server, final CommandSource sender, final User matchUser, final String[] args) {
    sender.sendMessage(tl("lightningUse", matchUser.getDisplayName()));
    final LightningStrike strike = matchUser.getBase().getWorld().strikeLightningEffect(matchUser.getBase().getLocation());
    if (!matchUser.isGodModeEnabled()) {
        matchUser.getBase().damage(power, strike);
    }
    if (ess.getSettings().warnOnSmite()) {
        matchUser.sendMessage(tl("lightningSmited"));
    }
}
Also used : LightningStrike(org.bukkit.entity.LightningStrike)

Aggregations

LightningStrike (org.bukkit.entity.LightningStrike)2