Adds a listener for Hopper Minecarts and cancels the event if the source container is locked.