mirror of
https://e.coding.net/circlecloud/EquipManager.git
synced 2024-12-04 12:38:48 +00:00
fix Material.AIR error...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
3ed2f3e82f
commit
d3b6f44eaa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user