Mods/TrainCarts/Commands

Introduction
Commands are used to control trains or single carts through chat commands. They can also be used to perform routine tasks, such as removing all trains from a world.

Until this is finished, most of the commands found here still function.

Syntax basic
To perform a command, either use /train  or /cart . When using the train version, you want to operate on the entire train or perform a global train command. When using the cart version, you want to operate on a single cart. If you need to operate on a train or cart, first select the cart. This is done by 'hitting' a minecart, or entering a minecart, or placing a minecart.

Global commands
The below commands only work on /train and don't require a selection to function.

Reroute
/train reroute If the path finding system is failing because the track got changed, you can use this command to force the plugin to re-calculate all destination paths.

Destroy all
/train destroyall /train removeall Destroys all minecarts and trains on the server. Can be useful to re-set the plugin.

Train and Cart commands
The below commands work for both /train and /cart.

Information
/train info /train i Shows train or cart related information, such as the name and set properties.

Ownership
/train claim Sets you as the only owner of this train. /train setowner [names...] /train setowners [names...] /train setowners Sets the owner names of this train. Use no names to clear the owners. /train addowner [names...] /train addowners [names...] Adds the owner names to this train.

To change ownership of a single minecart, use the '/cart' command instead of '/train'. When setting train owners, you set owners on all minecarts simultaneously. If no owners are set for a minecart, it can be freely edited and destroyed by everyone else.

Tags
/train settags [tags...] /train settag [tags...] /train tags [tags...] /train tag [tags...] /train settags Sets the tags of this train. Use no tags to clear the tags. /train addtags [tags...] /train addtag [tags...] Add tags to this train.

Tags can be used in combination with switcher or detector signs. For example, you can set a tag to order a train to be destroyed. Every minecart has a separate set of tags, setting tags on a train sets it for all minecarts simultaneously.

Destination
/train destination [destination] /train dest [destination] Sets the destination for this train.

You can also set a destination on a single minecart in the train, this way letting switcher signs split trains up in multiple carriages.

Player enter
/train playerenter [bool] Sets if players can enter the train or minecart.

Player exit
/train playerexit [bool] /train playerleave [bool] Sets if players can exit the train or minecart.

Pick up
/train pickup [bool] Sets if the storage minecart(s) (in the train) pick up nearby items from the ground.