diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java index 2d3cdd91..c2f83953 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Tornado.java @@ -27,18 +27,12 @@ public class Tornado extends EcoEnchant { Vector toAdd = new Vector(0, yVelocity, 0); - if (victim instanceof Player pVictim) { - AnticheatManager.exemptPlayer(pVictim); - - this.getPlugin().getScheduler().runLater(() -> { - AnticheatManager.unexemptPlayer(pVictim); - }, 40); - } - - this.getPlugin().getScheduler().run(() -> { + this.getPlugin().getScheduler().runLater(() -> { + if (victim instanceof Player player) { + AnticheatManager.exemptPlayer(player); + this.getPlugin().getScheduler().runLater(() -> AnticheatManager.unexemptPlayer(player), this.getConfig().getInt("time-to-exempt")); + } victim.setVelocity(victim.getVelocity().clone().add(toAdd)); - }); - - this.getPlugin().getScheduler().runLater(() -> victim.setVelocity(victim.getVelocity().clone().add(toAdd)), 1); + }, 1); } -} \ No newline at end of file +}