How can I make players automatically get into a minecart when they are near it without right-clicking? I need this for my server.
The only possible way would be to write your own plugin, or..
Use RailCraft mod.
RailCraft has embarking track, which is able to load entities into minecarts. When track is applied the redstone power, it will take the entity near and will load it into minecart. There is also reverse track, which disembarks from minecarts.
By harnessing the latent powers of the mysterious Ender Pearl we were able to develop a track capable streamlining the loading process of both passengers and animals!
This astounding breakthrough is capable of teleporting, yes teleporting, any nearby living being directly into an empty cart!
The range of this wonderful device can be adjusted by right-clicking the track with a crowbar. Additionally, because our R&D guys were tired of being teleported willy nilly while working on the device, they were able to tune it such that the specific molecular resonance of the trusty Crowbar will disrupt the teleportation field. Just hold it in front of you like a charm and you need not fear the whims of spacetime!
With TrainCraft, you probably will have hard times to do so, because that mod has maybe fancy models and textures, but....well, it is reaaally inferior with features. RailCraft is really better in doing automatization with your trains. It has all loading/unloading automatization, you can use semaphores and routing for automatically let trains drive between stations and way more. I doubt that TrainCraft has that. And one more thing - RailCraft is way more maintained, updated and so: There is already (not really finished) beta version for MC 1.10.2 .
If you have crashes with TrainCraft, you may want to know that it is nearly abandoned and those things won't get fixed, probably. However one cannot say anything without seeing crash-reports(but not here, because Arqade does not provide technical support for modded games), it might not be because of Traincraft at all....Really, Railcraft has way better support and active development, it only is oriented for vanilla-like style of models, compared to TrainCraft.
Edit: One note - it is possible that if TrainCraft is written with good manners, that RailCraft tracks will be compatible with TrainCraft carts. But I don't really know, if that is a thing.