From 0e03ecc547ff4bcb4acb00a2091ba62bb4ee5cf7 Mon Sep 17 00:00:00 2001 From: B1G-FUNGUS Date: Mon, 4 Oct 2021 19:55:53 -0700 Subject: [PATCH] AAAAAAAAAAAAA --- .../quidproquo/rituals/HasteRitual.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/main/java/top/penowl/quidproquo/rituals/HasteRitual.java diff --git a/src/main/java/top/penowl/quidproquo/rituals/HasteRitual.java b/src/main/java/top/penowl/quidproquo/rituals/HasteRitual.java new file mode 100644 index 0000000..8364d3e --- /dev/null +++ b/src/main/java/top/penowl/quidproquo/rituals/HasteRitual.java @@ -0,0 +1,35 @@ +package top.penowl.quidproquo.rituals; + +import java.util.Random; + +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import top.penowl.quidproquo.Ritual; + +public class HasteRitual extends Ritual { + + public static boolean enabled = false; + + @Override + public void setup() { + addIngredient(Material.DIAMOND_PICKAXE,1); + addIngredient(Material.WHEAT, 96); + addIngredient(Material.REDSTONE, 16); + health = 8; + name = "minering"; + description = "Give the target extreme haste or fatigue"; + } + + @Override + public void execute(Player caster, Player target, Location location) { + Random random = new Random(); + if(random.nextInt(10) == 0) { + target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 45, 50)); + } else target.addPotionEffect(new PotionEffect(PotionEffectType.SLOW_DIGGING, 45, 50)); + } + +}