mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-30 12:44:45 +02:00
Added "Master Angler" ability to Fishing.
This ability increases the chance that a fish will bite the line while fishing.
This commit is contained in:
@ -9,6 +9,7 @@ import java.util.Map;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Fish;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -41,6 +42,10 @@ public class FishingManager extends SkillManager {
|
||||
return target instanceof LivingEntity && getSkillLevel() >= AdvancedConfig.getInstance().getShakeUnlockLevel() && Permissions.shake(getPlayer());
|
||||
}
|
||||
|
||||
public boolean canMasterAngler() {
|
||||
return Permissions.masterAngler(getPlayer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the loot tier
|
||||
*
|
||||
@ -86,6 +91,10 @@ public class FishingManager extends SkillManager {
|
||||
return SkillUtils.handleFoodSkills(getPlayer(), skill, eventFoodLevel, Fishing.fishermansDietRankLevel1, Fishing.fishermansDietMaxLevel, rankChange);
|
||||
}
|
||||
|
||||
public void masterAngler(Fish hook) {
|
||||
hook.setBiteChance(Math.min(hook.getBiteChance() * (getSkillLevel() / 4.0), 1.0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the results from a successful fishing trip
|
||||
*
|
||||
|
Reference in New Issue
Block a user