EpicEnchants/src/main/java/com/craftaro/epicenchants/effect/effects/Lightning.java

20 lines
683 B
Java

package com.craftaro.epicenchants.effect.effects;
import com.craftaro.epicenchants.effect.EffectExecutor;
import com.craftaro.epicenchants.enums.EventType;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class Lightning extends EffectExecutor {
public Lightning(ConfigurationSection section) {
super(section);
}
@Override
public void execute(@NotNull Player user, LivingEntity opponent, int level, EventType eventType) {
consume(entity -> entity.getWorld().strikeLightning(entity.getLocation()), user, opponent);
}
}