mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows
This commit is contained in:
@ -23,10 +23,13 @@ public class Axes {
|
||||
public static double skullSplitterModifier = AdvancedConfig.getInstance().getSkullSplitterModifier();
|
||||
|
||||
protected static boolean hasArmor(LivingEntity target) {
|
||||
if(target.getEquipment() == null)
|
||||
if(target == null || !target.isValid() || target.getEquipment() == null)
|
||||
return false;
|
||||
|
||||
for (ItemStack itemStack : target.getEquipment().getArmorContents()) {
|
||||
if(itemStack == null)
|
||||
continue;
|
||||
|
||||
if (ItemUtils.isArmor(itemStack)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -92,6 +92,12 @@ public class SmeltingTracker {
|
||||
if(!Permissions.skillEnabled(player, PrimarySkillType.SMELTING))
|
||||
return;
|
||||
|
||||
//Don't swap ownership if its the same player
|
||||
if(getFurnaceOwner(furnace) != null) {
|
||||
if(getFurnaceOwner(furnace).getUniqueId().equals(player.getUniqueId()))
|
||||
return;
|
||||
}
|
||||
|
||||
changeFurnaceOwnership(furnace, player);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user