fix Material.AIR error...

Signed-off-by: 502647092 <jtb1@163.com>
master
502647092 2015-09-21 20:43:59 +08:00
parent 3ed2f3e82f
commit d3b6f44eaa
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ public class ArmorHandlerTask implements Runnable {
return;
ItemStack[] armors = p.getInventory().getArmorContents();
for (ItemStack armor : armors) {
if (armor == null || armor.getType() == Material.AIR)
continue;
String armorperm = "em." + armor.getType().toString().toLowerCase();
if (!p.hasPermission(armorperm) && !p.isOp() && !p.hasPermission("em.*")) {
p.getInventory().addItem(armor);