mirror of
https://e.coding.net/circlecloud/EquipManager.git
synced 2025-11-24 21:46:15 +00:00
@@ -17,6 +17,8 @@ public class ArmorHandlerTask implements Runnable {
|
|||||||
return;
|
return;
|
||||||
ItemStack[] armors = p.getInventory().getArmorContents();
|
ItemStack[] armors = p.getInventory().getArmorContents();
|
||||||
for (ItemStack armor : armors) {
|
for (ItemStack armor : armors) {
|
||||||
|
if (armor == null || armor.getType() == Material.AIR)
|
||||||
|
continue;
|
||||||
String armorperm = "em." + armor.getType().toString().toLowerCase();
|
String armorperm = "em." + armor.getType().toString().toLowerCase();
|
||||||
if (!p.hasPermission(armorperm) && !p.isOp() && !p.hasPermission("em.*")) {
|
if (!p.hasPermission(armorperm) && !p.isOp() && !p.hasPermission("em.*")) {
|
||||||
p.getInventory().addItem(armor);
|
p.getInventory().addItem(armor);
|
||||||
|
|||||||
Reference in New Issue
Block a user