Inventory#getContents() is expensive and it was being called unnecessarily.
I've also modified the mcMMOListener in the same manner, altough it's commented (I don't know why), to prevent this happening in the future.
This PR has been benchmarked and used in production for a long time, the performance improvements on the check were well above 10x.
Inventory#getContents() is expensive and it was being called unnecessarily. I've also modified the mcMMOListener in the same manner, altough it's commented (I don't know why), to prevent this happening in the future. This PR has been benchmarked and used in production for a long time, the performance improvements on the check were well above 10x.