If the liar says 'All my hats are green' then the statement 'All my hats are green' is false. Therefore, it is not true that all of the liar's hats are green. Given that he always lies, at least one of his hats must not be green. This implies that the liar must either have some hats or no hats at all. If he has no hats, the statement is vacuously true, which contradicts his nature as a liar.