1
0
mirror of https://e.coding.net/circlecloud/EquipManager.git synced 2025-11-24 21:46:15 +00:00

fix Material.AIR error...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092
2015-09-21 20:43:59 +08:00
parent 3ed2f3e82f
commit d3b6f44eaa

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);