AAAAAAAAAAAAA

This commit is contained in:
B1G-FUNGUS 2021-10-04 19:55:53 -07:00
parent 4b533199d1
commit 0e03ecc547

View File

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