mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-12-25 18:48:54 +01:00
Fix possible NPE.
This commit is contained in:
parent
fa28964d51
commit
646a31da73
@ -996,13 +996,13 @@ public class ArenaImpl implements Arena
|
|||||||
for (int i = contents.length-1; i > contents.length-5; i--) {
|
for (int i = contents.length-1; i > contents.length-5; i--) {
|
||||||
if (contents[i] == null) continue;
|
if (contents[i] == null) continue;
|
||||||
ArmorType type = ArmorType.getType(contents[i]);
|
ArmorType type = ArmorType.getType(contents[i]);
|
||||||
|
if (type == null) continue;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case HELMET: inv.setHelmet(contents[i]); break;
|
case HELMET: inv.setHelmet(contents[i]); break;
|
||||||
case CHESTPLATE: inv.setChestplate(contents[i]); break;
|
case CHESTPLATE: inv.setChestplate(contents[i]); break;
|
||||||
case LEGGINGS: inv.setLeggings(contents[i]); break;
|
case LEGGINGS: inv.setLeggings(contents[i]); break;
|
||||||
case BOOTS: inv.setBoots(contents[i]); break;
|
case BOOTS: inv.setBoots(contents[i]); break;
|
||||||
default:
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
contents[i] = null;
|
contents[i] = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user