FarmingProtection

public class FarmingProtection

Prevents farming of natural elite mobs by limiting rewarded kills per time window. Also limits XP/loot based on level difference between player and mob.

Constructors

Link copied to clipboard
public void FarmingProtection()

Functions

Link copied to clipboard
public static int getCurrentWindowKills(Player player)
Gets how many kills the player has made in the current farming protection window.
Link copied to clipboard
public static int getEffectiveMobLevelForLoot(Player player, int mobLevel)
Gets the effective mob level for loot calculation (capped at +5 of combat level).
Link copied to clipboard
public static int getEffectiveMobLevelForXP(Player player, int mobLevel)
Gets the effective mob level for XP calculation (capped at +5 of combat level).
Link copied to clipboard
public static int getEffectiveRewardLevel(int combatLevel, int mobLevel)
Link copied to clipboard
public static double getXPMultiplier(int combatLevel, int mobLevel)

public static double getXPMultiplier(Player player, int mobLevel)
Calculates XP multiplier based on level difference.
Link copied to clipboard
public static boolean isLevelRewardProtectionEnabled()
Link copied to clipboard
public static boolean isPlayerCapped(Player player)
Checks if a player is currently capped from earning natural elite rewards.
Link copied to clipboard
public static boolean isSkillXPInRange(int skillLevel, int mobLevel, boolean scaledCombat)
Whether a kill is close enough to the player's level to award skill XP.
Link copied to clipboard
public static boolean recordNaturalEliteKill(Player player, EliteEntity eliteEntity)
Records a natural elite kill and checks if the player is capped.
Link copied to clipboard
public static boolean shouldDropLoot(Player player, int mobLevel)
Checks if loot should drop based on level difference.
Link copied to clipboard
public static void shutdown()