diff --git a/src/main/java/top/penowl/quidproquo/QuidProQuo.java b/src/main/java/top/penowl/quidproquo/QuidProQuo.java index 8d9ae4e..6f36d45 100644 --- a/src/main/java/top/penowl/quidproquo/QuidProQuo.java +++ b/src/main/java/top/penowl/quidproquo/QuidProQuo.java @@ -47,6 +47,7 @@ public class QuidProQuo extends JavaPlugin { rituals.add(new HerobrineRitual()); rituals.add(new HitRitual()); rituals.add(new LavaRitual()); + rituals.add(new LightningRitual()); rituals.add(new LightQuicktimeRitual()); rituals.add(new QuicktimeRitual()); rituals.add(new RotateRitual()); diff --git a/src/main/java/top/penowl/quidproquo/rituals/LightningRitual.java b/src/main/java/top/penowl/quidproquo/rituals/LightningRitual.java new file mode 100644 index 0000000..2a19adc --- /dev/null +++ b/src/main/java/top/penowl/quidproquo/rituals/LightningRitual.java @@ -0,0 +1,32 @@ +package top.penowl.quidproquo.rituals; + +import java.util.List; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.entity.Player; + +import top.penowl.quidproquo.Ritual; + +public class LightningRitual extends Ritual { + + @Override + public void setup() { + addIngredient(Material.WHEAT, 64); + addIngredient(Material.GLOWSTONE, 64); + name = "lightning location"; + } + + @Override + public void execute(Player caster, Player target, Location location) { + // Does this actually get the overworld? + World overworld = Bukkit.getWorld("world"); + List players = overworld.getPlayers(); + for(Player player : players) { + overworld.strikeLightningEffect(player.getLocation().clone().add(0, 1, 0)); + } + } + +}