Added a lightning ritual

reveals players locations in the overworld with lightning
This commit is contained in:
B1G-FUNGUS 2021-10-03 13:35:48 -07:00
parent 3a4485ce57
commit 222b0b0732
2 changed files with 33 additions and 0 deletions

View File

@ -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());

View File

@ -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<Player> players = overworld.getPlayers();
for(Player player : players) {
overworld.strikeLightningEffect(player.getLocation().clone().add(0, 1, 0));
}
}
}