diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java index 9841544e..e1225eec 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Rapid.java @@ -1,10 +1,12 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal; +import com.willfp.eco.core.integrations.anticheat.AnticheatManager; import com.willfp.ecoenchants.enchantments.EcoEnchant; import com.willfp.ecoenchants.enchantments.EcoEnchants; import com.willfp.ecoenchants.enchantments.meta.EnchantmentType; import org.bukkit.entity.Arrow; import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityShootBowEvent; import org.jetbrains.annotations.NotNull; @@ -20,6 +22,9 @@ public class Rapid extends EcoEnchant { @NotNull final Arrow arrow, final int level, @NotNull final EntityShootBowEvent event) { + if (shooter instanceof Player player) { + AnticheatManager.exemptPlayer(player); + } double multiplier = 1 - ((this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "percent-faster-per-level") / 100) * level); if (event.getForce() < multiplier) { @@ -28,5 +33,9 @@ public class Rapid extends EcoEnchant { double force = 1 / event.getForce(); event.getProjectile().setVelocity(event.getProjectile().getVelocity().multiply(force)); + + if (shooter instanceof Player player) { + AnticheatManager.unexemptPlayer(player); + } } }