mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Cleanup exploit prevention method.
This commit is contained in:
parent
49a5bd2ba6
commit
ad4ee6f402
@ -28,9 +28,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canRoll() {
|
||||
Player player = getPlayer();
|
||||
|
||||
return !exploitPrevention() && Permissions.roll(player);
|
||||
return !exploitPrevention() && Permissions.roll(getPlayer());
|
||||
}
|
||||
|
||||
public boolean canDodge(Entity damager) {
|
||||
@ -128,15 +126,7 @@ public class AcrobaticsManager extends SkillManager {
|
||||
public boolean exploitPrevention() {
|
||||
Player player = getPlayer();
|
||||
|
||||
if (player.getItemInHand().getType() == Material.ENDER_PEARL) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Config.getInstance().getAcrobaticsAFKDisabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.isInsideVehicle()) {
|
||||
if (player.getItemInHand().getType() == Material.ENDER_PEARL || Config.getInstance().getAcrobaticsAFKDisabled() || player.isInsideVehicle()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user