
TC Portals
TrainCarts-Addon for cross-server teleporting of trains (BungeeCord)
TC-Portals
Requires: TrainCarts, CTCommons and a MySQL-Database
Java-Version: 17 or above
Minecraft-Version: 1.17.1 or above
TC-Portals is a plugin for Minecraft servers using SpigotMC, PaperMC or forks of these projects.
It serves as an add-on for the TrainCarts plugin which adds ActionSigns, supporting cross-server teleporting of trains in a BungeeCord network.
It is very lightweight as database queries and network connections run asynchronously where possible.
This plugin was developed for the CraftTogetherMC Minecraft server, see also: TC-Destinations!
A big thank you and lots of love go out to TeamBergerhealer
Also, a lot of appreciation goes to the people behind Cloud and Adventure!
Dev-Builds: See here
ActionSigns
The signs behave like ordinary traincarts signs.
You can de/activate them with redstone, alter trigger-directions, etc.
A portal exit behaves like a spawn sign, so you must set a direction for it like you do with the spawn sign.
The spawn direction can be set by specifying trigger directions.
For example: [train:left] or [train:right]. If none is set, the train is spawned based on what side is powered by redstone.
If you use [cart] instead of [train], a train will be spawned at the exit cart by cart.
Signs
|  | Bidirectional Portal This sign represents a portal entrance and exit at the same time. A pair of these signs that have the same channel name can be passed from either side. The other sign acts as a portal exit. | 
|  | Directional Portal (Entrance) This sign represents a portal entrance. A portal of this type requires a portal-out-sign that has the same channel name.Any number of portal-in-signs can be created for one channel. | 
|  | Directional Portal (Exit) This sign represents a portal exit. Signs of this type can only exist once per channel name. | 
Flags
There are some flags you can use on the fourth line of a portal-sign to control whether items and mobs are transported.
You can use them at the entrance as well as at the exit or both.
- !mobsmeans mobs are killed
- !itemsmeans items are killed
- -mobsmeans mobs are ejected
- -itemsmeans items are dropped
Pathfinding across servers (BungeeCord)
With a little extra work, it is possible to reach destinations on another server.
For example, if you want to drive from server1 to a destination on server2,
you need to create a destination on server1 that leads to the portal, which leads to server2.
Let's name it server2 as well.
Now you create a route for the train, which first contain the destination: server2 and then afterwards,
the destination you want to reach.
Thats it!
If you use TC-Destinations to manage your destinations, it will do the routing part for you.
Libraries used
- CTCommons (CraftTogether's plugin library)
- BKCommonLib (Extensive plugin library)
- Adventure (Very neat UI-Framework for Bukkit/Bungeecord and more)
- MiniMessage (Text format to represent chat components)
- HikariCP (High-performance, JDBC connection pool)
- MariaDB Connector/J (JDBC-Driver)