Fix exploitPrevention() and add Javadocs

This commit is contained in:
TfT_02
2013-10-28 15:39:47 +01:00
parent c612036db3
commit be792a1052
3 changed files with 14 additions and 4 deletions

View File

@ -123,10 +123,20 @@ public class AcrobaticsManager extends SkillManager {
return damage;
}
/**
* Check if the player is "farming" Acrobatics XP using
* exploits in the game.
*
* @return true if exploits are detected, false otherwise
*/
public boolean exploitPrevention() {
if (!Config.getInstance().getAcrobaticsPreventAFK()) {
return false;
}
Player player = getPlayer();
if (player.getItemInHand().getType() == Material.ENDER_PEARL || Config.getInstance().getAcrobaticsAFKDisabled() || player.isInsideVehicle()) {
if (player.getItemInHand().getType() == Material.ENDER_PEARL || player.isInsideVehicle()) {
return true;
}

View File

@ -43,7 +43,7 @@ public class HerbalismManager extends SkillManager {
}
public boolean canBlockCheck() {
return !(Config.getInstance().getHerbalismAFKDisabled() && getPlayer().isInsideVehicle());
return !(Config.getInstance().getHerbalismPreventAFK() && getPlayer().isInsideVehicle());
}
public boolean canGreenThumbBlock(BlockState blockState) {