mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-12-25 02:27:35 +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--) {
|
||||
if (contents[i] == null) continue;
|
||||
ArmorType type = ArmorType.getType(contents[i]);
|
||||
if (type == null) continue;
|
||||
|
||||
switch (type) {
|
||||
case HELMET: inv.setHelmet(contents[i]); break;
|
||||
case CHESTPLATE: inv.setChestplate(contents[i]); break;
|
||||
case LEGGINGS: inv.setLeggings(contents[i]); break;
|
||||
case BOOTS: inv.setBoots(contents[i]); break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
contents[i] = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user