mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
2.1.137 - avoid npe on armor iterating
This commit is contained in:
parent
9266a54fce
commit
9f9518eea0
@ -1,3 +1,6 @@
|
|||||||
|
Version 2.1.137
|
||||||
|
Added some code to avoid NPE errors when checking armor on entities
|
||||||
|
|
||||||
Version 2.1.136
|
Version 2.1.136
|
||||||
Furnace ownership is no longer lost when the furnace stops doing a job
|
Furnace ownership is no longer lost when the furnace stops doing a job
|
||||||
Furnaces remember owners between restarts (requires MC 1.14 or higher)
|
Furnaces remember owners between restarts (requires MC 1.14 or higher)
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.136</version>
|
<version>2.1.137</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -23,10 +23,13 @@ public class Axes {
|
|||||||
public static double skullSplitterModifier = AdvancedConfig.getInstance().getSkullSplitterModifier();
|
public static double skullSplitterModifier = AdvancedConfig.getInstance().getSkullSplitterModifier();
|
||||||
|
|
||||||
protected static boolean hasArmor(LivingEntity target) {
|
protected static boolean hasArmor(LivingEntity target) {
|
||||||
if(target.getEquipment() == null)
|
if(target == null || !target.isValid() || target.getEquipment() == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (ItemStack itemStack : target.getEquipment().getArmorContents()) {
|
for (ItemStack itemStack : target.getEquipment().getArmorContents()) {
|
||||||
|
if(itemStack == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (ItemUtils.isArmor(itemStack)) {
|
if (ItemUtils.isArmor(itemStack)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,6 @@ public class SmeltingTracker {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
changeFurnaceOwnership(furnace, player);
|
changeFurnaceOwnership(furnace, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user