mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 12:14:43 +02:00
Adding the option to negate experience earned for Acrobatics or Herbalism while in a minecart to prevent afk leveling.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user