diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 40f395966e..c31d62ed68 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -371,6 +371,12 @@ public class CraftWorld implements World { return new CraftLightningStrike(server, lightning); } + public LightningStrike strikeLightningEffect(Location loc) { + EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ(), true); + world.a(lightning); + return new CraftLightningStrike(server, lightning); + } + public boolean generateTree(Location loc, TreeType type) { return generateTree(loc, type, world); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java index d081b7f85e..3c595a2a76 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java @@ -14,4 +14,8 @@ public class CraftLightningStrike extends CraftEntity implements LightningStrike public EntityWeatherStorm getHandle() { return (EntityWeatherStorm)super.getHandle(); } + + public boolean isEffect() { + return ((EntityWeatherStorm) super.getHandle()).isEffect; + } }