if (res.getItemIgnoreList().isListed(mat)) {
return;
}
}
boolean hasdestroy = perms.playerHas(pname, player.getWorld().getName(), "destroy", perms.playerHas(pname, player.getWorld().getName(), "build", true));
boolean hasContainer = perms.playerHas(pname, player.getWorld().getName(), "container", true);
if (!hasdestroy || (!hasContainer && mat == Material.CHEST)) {
event.setCancelled(true);
player.sendMessage(ChatColor.RED + Residence.getLanguage().getPhrase("NoPermission"));
return;
}