mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-03-12 13:39:06 +01:00
Fixed grindstone dupe bug
This commit is contained in:
parent
e55ba7d6c1
commit
717c2a87ba
@ -27,12 +27,18 @@ public class Tornado extends EcoEnchant {
|
||||
|
||||
Vector toAdd = new Vector(0, yVelocity, 0);
|
||||
|
||||
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"));
|
||||
}
|
||||
if (victim instanceof Player pVictim) {
|
||||
AnticheatManager.exemptPlayer(pVictim);
|
||||
|
||||
this.getPlugin().getScheduler().runLater(() -> {
|
||||
AnticheatManager.unexemptPlayer(pVictim);
|
||||
}, 40);
|
||||
}
|
||||
|
||||
this.getPlugin().getScheduler().run(() -> {
|
||||
victim.setVelocity(victim.getVelocity().clone().add(toAdd));
|
||||
}, 1);
|
||||
});
|
||||
|
||||
this.getPlugin().getScheduler().runLater(() -> victim.setVelocity(victim.getVelocity().clone().add(toAdd)), 1);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user