mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 13:05:30 +02:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into configurable
This commit is contained in:
@@ -225,9 +225,13 @@ public final class CombatUtils {
|
||||
}
|
||||
|
||||
double distanceMultiplier = archeryManager.distanceXpBonusMultiplier(target, arrow);
|
||||
double forceMultiplier = 1.0; //Hacky Fix - some plugins spawn arrows and assign them to players after the ProjectileLaunchEvent fires
|
||||
|
||||
if(arrow.hasMetadata(MetadataConstants.BOW_FORCE_METAKEY))
|
||||
forceMultiplier = arrow.getMetadata(MetadataConstants.BOW_FORCE_METAKEY).get(0).asDouble();
|
||||
|
||||
applyScaledModifiers(initialDamage, finalDamage, event);
|
||||
startGainXp(mcMMOPlayer, target, PrimarySkillType.ARCHERY, arrow.getMetadata(MetadataConstants.BOW_FORCE_METAKEY).get(0).asDouble() * distanceMultiplier);
|
||||
startGainXp(mcMMOPlayer, target, PrimarySkillType.ARCHERY, forceMultiplier * distanceMultiplier);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -399,7 +399,7 @@ public class RankUtils {
|
||||
}
|
||||
|
||||
//Default to the max level for the skill if any errors were encountered incorrect
|
||||
return mcMMO.getConfigManager().getConfigLeveling().getLevelCap(subSkillType.getParentSkill());
|
||||
return mcMMO.getConfigManager().getConfigLeveling().getSkillLevelCap(subSkillType.getParentSkill());
|
||||
}
|
||||
|
||||
public static boolean isPlayerMaxRankInSubSkill(Player player, SubSkillType subSkillType) {
|
||||
|
@@ -253,8 +253,7 @@ public class SkillUtils {
|
||||
* @param maxDamageModifier the amount to adjust the max damage by
|
||||
*/
|
||||
public static void handleDurabilityChange(ItemStack itemStack, double durabilityModifier, double maxDamageModifier) {
|
||||
if((itemStack.getItemMeta().getEnchants().get(Enchantment.DURABILITY) != null && itemStack.getItemMeta().getEnchants().get(Enchantment.DURABILITY) >= 1)
|
||||
|| (itemStack.getItemMeta() != null && itemStack.getItemMeta().isUnbreakable())) {
|
||||
if(itemStack.getItemMeta() != null && itemStack.getItemMeta().isUnbreakable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user