Adding the option to negate experience earned for Acrobatics or Herbalism while in a minecart to prevent afk leveling.

This commit is contained in:
Glitchfinder
2012-11-07 18:41:18 -08:00
parent b8d37cb223
commit d1f683b8a5
4 changed files with 16 additions and 0 deletions

View File

@ -80,6 +80,9 @@ public class Herbalism {
* @param plugin mcMMO plugin instance
*/
public static void herbalismProcCheck(final Block block, Player player, BlockBreakEvent event, mcMMO plugin) {
if(player == null)
return;
final PlayerProfile profile = Users.getProfile(player);
final int MAX_BONUS_LEVEL = 1000;
@ -363,6 +366,9 @@ public class Herbalism {
}
}
if(Config.getInstance().getHerbalismAFKDisabled() && player.isInsideVehicle())
return;
Skills.xpProcessing(player, profile, SkillType.HERBALISM, xp);
}