use of org.bukkit.craftbukkit.v1_15_R1.entity.CraftLightningStrike in project solinia3-core by mixxit.
the class SpecialEffectUtils method playLightningStrike.
public static void playLightningStrike(Entity entity) {
try {
Location loc = entity.getLocation();
net.minecraft.server.v1_15_R1.WorldServer world = ((CraftWorld) loc.getWorld()).getHandle();
EntityLightning lightning = new EntityLightning(world, loc.getX(), loc.getY(), loc.getZ(), true, true);
world.strikeLightning(lightning);
new CraftLightningStrike(world.getServer(), lightning);
return;
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations