mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Merge branch 'master' of https://github.com/mcMMO-Dev/mcMMO
This commit is contained in:
@ -33,7 +33,6 @@ import com.gmail.nossr50.runnables.GainXp;
|
||||
import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager;
|
||||
import com.gmail.nossr50.skills.archery.ArcheryManager;
|
||||
import com.gmail.nossr50.skills.axes.AxeManager;
|
||||
import com.gmail.nossr50.skills.axes.Axes;
|
||||
import com.gmail.nossr50.skills.swords.Swords;
|
||||
import com.gmail.nossr50.skills.swords.SwordsManager;
|
||||
import com.gmail.nossr50.skills.taming.TamingManager;
|
||||
@ -101,12 +100,10 @@ public class Combat {
|
||||
|
||||
axeManager.bonusDamage(event);
|
||||
axeManager.criticalHitCheck(event);
|
||||
axeManager.impact(event);
|
||||
|
||||
if (Permissions.impact(attacker)) {
|
||||
Axes.impact(attacker, target, event);
|
||||
}
|
||||
|
||||
if (attackerProfile.getAbilityMode(AbilityType.SKULL_SPLIITER) && Permissions.skullSplitter(attacker)) {
|
||||
if (attackerProfile.getAbilityMode(AbilityType.SKULL_SPLIITER)) {
|
||||
axeManager.skullSplitter(event);
|
||||
applyAbilityAoE(attacker, target, event.getDamage() / 2, SkillType.AXES);
|
||||
}
|
||||
|
||||
|
@ -11,10 +11,12 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
||||
@ -25,11 +27,29 @@ import com.gmail.nossr50.party.PartyManager;
|
||||
public class Misc {
|
||||
private static Random random = new Random();
|
||||
|
||||
public static final int TOOL_DURABILITY_LOSS = Config.getInstance().getAbilityToolDamage();
|
||||
public static int toolDurabilityLoss = Config.getInstance().getAbilityToolDamage();
|
||||
public static int abilityLengthIncreaseLevel = AdvancedConfig.getInstance().getAbilityLength();
|
||||
|
||||
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
|
||||
public static final int TIME_CONVERSION_FACTOR = 1000;
|
||||
public static final double SKILL_MESSAGE_MAX_SENDING_DISTANCE = 10.0;
|
||||
|
||||
/**
|
||||
* Check if a player has armor.
|
||||
*
|
||||
* @param player Player whose armor to check
|
||||
* @return true if the player has armor, false otherwise
|
||||
*/
|
||||
public static boolean hasArmor(LivingEntity entity) {
|
||||
EntityEquipment equipment = entity.getEquipment();
|
||||
|
||||
if (equipment.getBoots() != null || equipment.getChestplate() != null || equipment.getHelmet() != null || equipment.getLeggings() != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isFriendlyPet(Player attacker, Tameable pet) {
|
||||
if (pet.isTamed()) {
|
||||
AnimalTamer tamer = pet.getOwner();
|
||||
|
Reference in New Issue
Block a user