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() {
|
public boolean canRoll() {
|
||||||
Player player = getPlayer();
|
return !exploitPrevention() && Permissions.roll(getPlayer());
|
||||||
|
|
||||||
return !exploitPrevention() && Permissions.roll(player);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canDodge(Entity damager) {
|
public boolean canDodge(Entity damager) {
|
||||||
@ -128,15 +126,7 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
public boolean exploitPrevention() {
|
public boolean exploitPrevention() {
|
||||||
Player player = getPlayer();
|
Player player = getPlayer();
|
||||||
|
|
||||||
if (player.getItemInHand().getType() == Material.ENDER_PEARL) {
|
if (player.getItemInHand().getType() == Material.ENDER_PEARL || Config.getInstance().getAcrobaticsAFKDisabled() || player.isInsideVehicle()) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Config.getInstance().getAcrobaticsAFKDisabled()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (player.isInsideVehicle()) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user