Development Builds / Modrinth / SpigotMC
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!
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.
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.
!mobs
means mobs are killed!items
means items are killed-mobs
means mobs are ejected-items
means items are dropped
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.
- 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)
- MySQL Connector/J (JDBC-Driver)
CREATE TABLE `tc_portals` (
`id` int(11) NOT NULL,
`name` varchar(16) NOT NULL,
`type` varchar(16) NOT NULL,
`host` varchar(128) DEFAULT NULL,
`port` int(11) DEFAULT NULL,
`server` varchar(128) DEFAULT NULL,
`world` varchar(128) DEFAULT NULL,
`x` double DEFAULT NULL,
`y` double DEFAULT NULL,
`z` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `tc_portals`
ADD PRIMARY KEY (`id`),
ADD KEY `name` (`name`) USING BTREE;
ALTER TABLE `tc_portals`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;