/clear @p[hasitem={quantity=!1,quantity=!2,quantity=!3,item=dirt}] dirt -1 4
when I have 1 or 2 dirt in my inventory this command is not supposed to clear the dirt from my inventory but it does.
/clear @p[hasitem={quantity=!1,quantity=!2,quantity=!3,item=dirt}] dirt -1 4
when I have 1 or 2 dirt in my inventory this command is not supposed to clear the dirt from my inventory but it does.
You should only specify the quantity once. If you want a range (ie, greater than 2, use quantity=3.. (with the two dots) to indicate a range from 3 to unlimited.
Does that work for you?
In the future, you might want to visit Community Support for help with commands before submitting a bug report.
This report has been temporarily closed as Awaiting Response. It will automatically reopen when you comment with new information. Please be sure to provide all requested information. Reports that do not contain enough information may be closed as Incomplete.
You may find this Report Creation Form helpful for any future reports you create.