-
Notifications
You must be signed in to change notification settings - Fork 12
Gates
Every gate has a name, but a gate's name has more than one form. The simplest is the gate's basic name. A gate's basic name must be 15 characters or less and cannot contain periods (.) or asterisks (*). A basic name must be unique within the world it exists. When a player is in the same world as the gate, they can usually refer to the gate by it's basic name. However, when a player is not in the same world as a gate, or an administrator is using the console, a fully qualified gate name (FQGN) must be specified.
A FQGN is a period-separated string, sort of like an Internet domain name. A gate's FQGN has either two or three parts - depending on if the gate is on a remote server or the local server - separated by periods. FQGNs for gates on the local server have two name parts. The first name part is the name of the world within which the gate exists. The second part is the gate's basic name. FQGNs for gates on remote servers have three name parts. The first name part is the name of the server (as assigned when the server was added using the trp server add ... command) where the gate exists. The second part is the name of world on the remote server within which the gate exists. The third part is the gate's basic name.
When a command requires a gate's name, you may be able to specify just the basic name, as long as the plugin can figure out what you mean. However, you can always use a gate's FQGN. In general, commands issued on the console require FQGNs since there is no "current world" to use as a context.
Use the trp gate list command to get a list of all known gates. The names listed will be FQGNs and can be used directly in any command requiring a gate name.
As of v8.0 of the plugin, there are two gate types: BLOCK and AREA. Block gates are created based on Design. Area gates are rectangular volumes with no visible structure (in general).
As of v8.1 of the plugin, there is an additional gate type: SERVER. A server gate is always created in the server's default world and no physical structure. You cannot add outbound links to a server gate; players can only teleport into the gate. When they do, they are not placed in any specific world or location; they are placed where ever the server would place them as if they logged into the server normally. So if a player has never visited the server, they would be be placed at the default spawn location in the default world. If the player had played on the server previously, they would be placed where they were when they last logged off.
There are two ways to create gates and two ways to destroy them. Area and server gates can only use one of either technique while block gates can use either.
For all gate types, the trp design create ... or trp gate create ... commands can be used to create a gate. For a block gate, the design name is provided as an argument. For an area gate, the word "area" is provided as a design name, and for a server gate, the word "server" is provided. The commands require a name for the new gate and optionally accept a link specification to add to the new gate (except for server gates which don't accept links). See below for information about linking.
Block gates can also be created using a two step process of building the gate structure, then creating the gate. The gate structure can be built by placing blocks in locations that match an existing design file, or by using the trp design build ... command to build the gate all at once based on a named design. In either case, one of the blocks of the gate will be a sign. The sign must be the last block placed. The gate's name should be the first line of the sign. This sign becomes the gate's "screen". The sign must be placed in a location that corresponds to a screen in one of the available gate designs. The sign can also contain another gate's name to automatically link the new gate to an existing gate in a single step. See the section on linking, below, for more information about that.
A gate can have one or more "screens". A screen is simply a sign, but is distinct in an important way. Screen's always show a gate's name and it's current destination and are updated automatically by the plugin. A gate may also have other, normal, signs, which might contain any text and are not updated by the plugin.
Destroying a gate is accomplished using one of two techniques: by destroying one of the screens on a gate, or using the trp gate destroy ... command. Destroying a screen must be done in the standard Minecraft way and not by using some special, plugin specific technique. There are many plugins which give users access to "super pickaxes" and other ways to remove/change blocks in the world, but they often work by simply removing/changing blocks from the world, not by actually "destroying" blocks, which is what allows the Transporter plugin to detect the change and destroy the gate.
Destroying a gate using the trp gate destroy ... command allows the use of the "unbuild" keyword. Destroying a gate with this command and keyword will replace all the gate's blocks with air. This is convenient when the gate contains a lot of obsidian (or even bedrock), which would difficult (or impossible) to destroy manually.
Destroying or removing any blocks in a gate other than screen blocks does nothing to the gate except make it look bad. The gate will still function normally. See the next section for information about restoring a gate to it's pristine condition. If you'd like to prevent players from messing with the blocks in a gate, you can set the "protect" gate option (see Options below).
If the blocks that make up a gate are damaged, either by other players, TNT, creepers, or whatever other destructive techniques may be available on a server, you can rebuild the gate by using the trp gate rebuild ... command. The command puts back all the blocks that make up the gate.
The plugin keeps track of each player's "selected gate". A player can only have a single selected gate at a time. Almost all gate commands that require a gate name will use a player's selected gate when no gate name is provided as a command argument.
To select a gate, you must interact with it or use the trp gate select ... command. Interacting with a gate means punching a gate's screen or trigger. Traveling through a gate does not constitute interaction.
Linking gates is accomplished either by providing a destination gate name on the sign when creating a new gate, or by using the trp gate link add ... command. When providing a destination gate name on a sign, the first line of text on the sign must be the new gate's name. The remaining lines contain the parts of the a gate's FQGN (see Names above), one on each line. If the destination gate is in the same world as the new gate, you can use just the gate's basic name instead of the FQGN. The last line on the sign can also be the keyword "reverse" (or any leading substring) to cause the new gate to be linked bidirectionally with the destination gate, but this only works between gates on the same server since linking to another server requires all 4 lines on the sign.
Line 1: gate name Line 2: destination gate name
Line 1: gate name Line 2: destination world name Line 3: destination gate name
Line 1: gate name Line 2: destination world name Line 3: destination gate name Line 4: reverse
Line 1: gate name Line 2: destination server name Line 3: destination world name Line 4: destination gate name
The trp gate link add ... command also links gates and will also accept the "reverse" keyword as its last argument. But unlink the sign linking technique, gates between servers can be linked bidirectionally.
Gates can link to more than one destination gate if the gate's "multiLink" option is true (see Options below). The trp gate link add ... command must be used to add the second and subsequent links. The gate can only have a single "current" destination and it will be shown on the gate's screens. To change a multi-linked gate's destination, interact (punch) the gate's switch (which is commonly one of its screens, but doesn't have to be). The gate's destination will cycle to the next link and wrap around to the first link when the list is completed. The plugin has special logic in place when a gate's switch is the same as it's trigger (see Opening and Closing below): when the last link is reached, the gate is closed and the destination is set to the first link.
To remove a link from a gate, use the trp gate link remove ... command.
To see all the links a gate has, including which link is the current destination, use the trp gate info command. In the list of links, the current destination will be marked with an asterisk.
In order to travel through a gate (either coming or going), the gate must be open. Opening a gate is normally accomplished by interacting (punching) the gate's trigger (which is commonly one of its screens, but doesn't have to be). You can also use the trp gate open ... command.
Every gate has a variable "duration" (see Options below). If the duration is set to be infinite, a gate will never close unless either it's explicity closed, or other conditions require it to close (e.g., if the gate's current destination gate is destroyed). If a non-infinite duration is set, the gate will automatically close after the configured time. However, the gate may not automatically close under some circumstances.
To explicitly close a gate, either interact with its trigger, or use the trp gate close ... command.
A PIN (Personal Identification Number) is like a password and can contain any number of characters of any type. A player sets their active PIN using the trp pin ... command. A player can have only one PIN set at a time and the PIN is not remembered when the player disconnects. A player's PIN is transmitted when they travel through a gate to another server, so it's not necessary for the player to set their PIN again after teleporting.
A gate can have multiple PINs associated with it. PINs enable restricted travel through gates (both sending and receiving). Use the trp gate pin add ... command to add a PIN to a gate, and the trp gate pin remove ... command to remove a PIN from a gate. Set a gate's "requirePin" option (see Options below) to true to enable PIN checking.
When the player enters a gate whose "requirePin" option is true, the player's PIN is checked against the gate's PIN list. If the player's PIN is not found in the list, the player is notified and travel is denied. If the destination gate's "requirePin" option is true, the player's PIN is then checked against the destination gate's PIN list. What happens next depends on the destination gate's "requireValidPin" option.
If the "requireValuePin" option is true, which is the default, and the travelling player's PIN does not match any PIN in the destination gate's PIN list, the player is notified they have an invalid PIN and travel is denied. If the "requireValidPin" option is false, the player is allowed to travel, even with an invalid PIN. When they arrive however, the player's health will take damage according to the "invalidPinDamage" option.
Chat can be relayed to remote servers in one of two ways. The first is relay all player chat. This is accomplished using server options. The second is based on gates and described here.
Gates with links to gates on other servers can relay chat messages between servers. Relaying chat messages only occurs when the gates on both servers are open, the gates are connected to each other, their "sendChat" and "receiveChat" options (see Options below) are true, and player's are within a certain distance of the open gates. Player's sending a chat message (talking) must be within the sending gate's "sendChatDistance", and players receiving messages (listening) must be within the receiving gate's "receiveChatDistance".
If you'd like to effectively enable full server-to-server chat using only gates, make sure both gates are always open ("duration" options set to -1), only link to each other, and have their "sendChatDistance" and "receiveChatDistance" options set to -1. But if all you want is on-all-the-time-server-to-server chat, see Servers.
Each gate has a number of options that effect how it behaves. Each option is described below. To set a gate option, use the trp gate set ... command. Use the trp gate get ... command to see current gate option values.
These options are available on all gate types:
Option | Type | Default | Version | Description |
allowGameModes | string | * | v7.3+ | A comma separated list of allowed game modes. Minecraft currently only allows "CREATIVE" or "SURVIVAL". By default, any game mode is allowed, but you can limit using this setting. An value of "*" means any game mode is allowed. |
countdown | integer | -1 | v8.9 | The number of milliseconds before a player will be teleported after stepping into the gate's portal area. A value of -1 disables the countdown so teleportation occurs immediately. |
countdownCancelFormat | string | %RED%Teleport canceled | v8.9 | The message sent to a player when the countdown has been canceled by the gate closing or the player stepping out of the gate's portal area. The following tokens can be used: %time% (the remaining time, in seconds, before teleportation), %fromGate% (the simple name of the originating gate), %fromWorld% (the name of the world where the originating gate is located). A value of "-" sets the message to an empty string and prevents any message from displaying. |
countdownFormat | string | %RED%Teleport countdown started... | v8.9 | The message sent to a player when the countdown has started by the player stepping into the gate's portal area. The following tokens can be used: %time% (the remaining time, in seconds, before teleportation), %fromGate% (the simple name of the originating gate), %fromWorld% (the name of the world where the originating gate is located). A value of "-" sets the message to an empty string and prevents any message from displaying. |
countdownInterval | integer | 1000 | v8.9 | The number of milliseconds between teleportation warnings. |
countdownIntervalFormat | string | %RED%Teleport in %time% seconds... | v8.9 | The periodic message sent to a player warning them of teleportation. The following tokens can be used: %time% (the remaining time, in seconds, before teleportation), %fromGate% (the simple name of the originating gate), %fromWorld% (the name of the world where the originating gate is located). A value of "-" sets the message to an empty string and prevents any message from displaying. |
deleteInventory | boolean | false | v7.0+ | Should an entity's inventory be deleted on the local server after they successfully teleport to a remote server through this gate? |
duration | integer | -1 | All | The number of milliseconds after which an open gate will close. Specify -1 to keep the gate open indefinitely (or until it's manually closed). |
gameMode | string | none | v8.0+ | If set, players arriving through this gate will have their game mode set to this value. |
invalidLinkFormat | string | invalid link selected | v7.0+ | Specifies the message to be displayed to a player when a gate's current link is invalid. A value of "-" sets the message to an empty string and prevents any message from displaying. |
invalidPinDamage | integer | 0 | All | If a player travels to this gate with an invalid pin, take away this much health when they arrive. |
linkLocal | boolean | true | All | Can this gate be linked to other gates in same world? |
linkLocalCost | float | 0 | v7.0+ | Economy The cost to link to a gate in the same world. |
linkLocalFormat | string | %fromGate%\n%toGate% | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate's current link points to a gate in the same world as this gate. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located), %toGate% (the simple name of the destination gate), %toWorld% (the name of the world where the destination gate is located), %toServer% (the name of the server where the destination gate is located). A value of "-" sets the sign to blank. |
linkOfflineFormat | string | %fromGate%\n\n<offline> | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate's current link points to a gate that is either offline or unavailable. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located), %toGate% (the simple name of the destination gate), %toWorld% (the name of the world where the destination gate is located), %toServer% (the name of the server where the destination gate is located). A value of "-" sets the sign to blank. |
linkNoneFormat | string | %fromGate%\n\n<none> | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate has no links. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located). A value of "-" sets the sign to blank. |
linkServer | boolean | true | All | Can this gate be linked to other gates on a different server? |
linkServerCost | float | 0 | v7.0+ | Economy The cost to link to a gate on a different server. |
linkServerFormat | string | %fromGate%\n%toServer%\n%toWorld%\n%toGate% | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate's current link points to a gate on a different server. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located), %toGate% (the simple name of the destination gate), %toWorld% (the name of the world where the destination gate is located), %toServer% (the name of the server where the destination gate is located). A value of "-" sets the sign to blank. |
linkUnselectedFormat | string | %fromGate%\n\n<unselected> | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate has no link selected. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located). A value of "-" sets the sign to blank. |
linkWorld | boolean | true | All | Can this gate be linked to other gates in a different world on the same server? |
linkWorldCost | float | 0 | v7.0+ | Economy The cost to link to a gate in a different world on the same server. |
linkWorldFormat | string | %fromGate%\n%toWorld%\n%toGate% | v7.7beta5+ | Specifies the message to be displayed on the gate's screen(s) when the gate's current link points to a gate in a different world than this gate, but on the same server. The following tokens will be replaced automatically: %fromGate% (the simple name of this gate), %fromWorld% (the name of the world where this gate is located), %toGate% (the simple name of the destination gate), %toWorld% (the name of the world where the destination gate is located), %toServer% (the name of the server where the destination gate is located). A value of "-" sets the sign to blank. |
markerFormat | string | %name% | v7.1+ | Specifies the gate's label in external mapping software. This setting currently only applies to Dynmap. A value of "-" sets the label to an empty string and disables the display of the gate marker. The following tokens will be replaced automatically: \n (embedded new line), %name% (the gate's simple name), %type% (the type of gate, either BLOCK or AREA), %creator% (the name of the player who created the gate), %sendLocal% (the cost to use this gate to travel to another gate in the same world), %sendWorld% (the cost to use this gate to travel to another gate in a different world), %sendServer% (the cost to use this gate to travel to another gate on a different server), %receiveLocal% (the cost to use this gate to travel from another gate in the same world), %receiveWorld% (the cost to use this gate to travel from another gate in a different world), %receiveServer% (the cost to use this gate to travel from another gate on a different server). Note: embedded HTML tags and newlines are not yet supported by Dynmap but hopefully will be in a future version. |
multiLink | boolean | true | All | Can this gate be linked to multiple gates? |
noLinksFormat | string | this gate has no links | v7.0+ | Specifies the message to be displayed to a player when a gate has no links. A value of "-" sets the message to an empty string and prevents any message from displaying. |
noLinkSelectedFormat | string | no link is selected | v7.0+ | Specifies the message to be displayed to a player when a gate has no link selected. A value of "-" sets the message to an empty string and prevents any message from displaying. |
protect | boolean | false | All | Prevent the blocks that make up the gate from being destroyed. |
randomNextLink | boolean | false | v7.8+ | When a gate's next link is selected, should it be a random link from the gate's link list? |
receiveChat | boolean | false | v7.0+ | Should this gate "hear" chat messages from other servers and relay those messages to players in the same world as the gate? |
receiveChatDistance | integer | 1000 | v7.0+ | The distance, in meters, within which chat messages will be "heard" by a player. In other words, a player must be within this distance of the gate for the gate to relay received chat messages to the player. Specify -1 to transmit chat to all players in the same world regardless of distance. |
receiveChatFilter | string | none | v8.2beta2 | A regular expression that must match a chat message in order for it to be received from this gate. An empty or null value always matches. |
receiveGameMode | boolean | false | v7.3+ | Should a player's game mode be preserved by the receiving gate? By default, a received player's game mode will be set to whatever the receiving server's game mode is. Use this setting to allow other game modes to be set. |
receiveInventory | boolean | true | v7.0+ | Should an entity's sent inventory be restored when they arrive through this gate? |
receiveLocalCost | float | 0 | v7.0+ | Economy The cost to travel to this gate from a gate in the same world. |
receivePotions | boolean | true | v8.0+ | Should a player's potion effects be restored when they arrive through this gate? |
receiveServerCost | float | 0 | v7.0+ | Economy The cost to travel to this gate from a gate on a different server. |
receiveStats | boolean | true | v8.0beta4+ | Should a player's statistics (health, remaining air, food level, exhaustion, saturation, and fire ticks) be restored when they arrive through this gate? |
receiveWorldCost | float | 0 | v7.0+ | Economy The cost to travel to this gate from a gate in a different world on the same server. |
receiveXP | boolean | false | v7.7+ | Should a player's level and experience points be restored when they arrive through this gate? |
requireAllowedItems | boolean | true | All | Only allow entities to arrive through the gate if all their inventory items are allowed through. |
requireAllowedPotions | boolean | true | v8.0+ | Only allow players to arrive through the gate if they have all the potion effects in the allowed potion effects list. |
requireLevel | integer | 0 | v8.7+ | The required level of a player in order to travel through this gate. A value of 0 allows any level. A player with this level or above will be allowed to teleport. |
requirePin | boolean | false | All | Does this gate require players to have a PIN before allowing them to travel through them (coming or going)? |
requireValidPin | boolean | true | All | If the gate requires a PIN (see above), must the PIN be valid (in the gate's list of allowed PINs)? By setting this false, you can deceive players into thinking they're PIN is accepted by the gate. See the next option for why this might be fun. |
sendChat | boolean | false | v7.0+ | Should this gate "hear" chat messages from players in the same world and transmit those messages to the current destination gate on another server? |
sendChatDistance | integer | 1000 | v7.0+ | The distance, in meters, within which chat messages will be "heard" by a sending gate. In other words, a player must be within this distance of the gate for the gate to transmit their chat message to another server. Specify -1 to transmit chat from any player in the same world regardless of distance. |
sendChatFilter | string | none | v8.2beta2 | A regular expression that must match a chat message in order for it to be sent to through this gate. An empty or null value always matches. |
sendChatFormatFilter | string | none | v8.3 | A regular expression that must match a chat message format in order for it to be sent through this gate. An empty or null value always matches. |
sendLocalCost | float | 0 | v7.0+ | Economy The cost to travel from this gate to a gate in the same world. |
sendNextLink | boolean | false | v7.8+ | Before an entity is teleported, should the gate select the next link? If this is used in conjunction with "randomNextLink", the entity will be sent to a random link. |
sendServerCost | float | 0 | v7.0+ | Economy The cost to travel from this gate to a gate on a different server. |
sendWorldCost | float | 0 | v7.0+ | Economy The cost to travel from this gate to a gate in a different world on the same server. |
teleportFormat | string | %GOLD%teleported to '%toGateCtx%' | v7.0+ | Specifies the message to be displayed to a player when they arrive at this gate. The following tokens will be replaced automatically: %player% (the player's display name), %toGateCtx% (the name of the destination gate relative to the player's location), %toGate% (the simple name of the destination gate), %toWorld% (the name of the world where the destination gate is located), %fromGateCtx% (the name of the originating gate relative to the player's location), %fromGate% (the simple name of the originating gate), %fromWorld% (the name of the world where the originating gate is located), %fromServer% (the name of server where the player came from, or "local"). A value of "-" sets the message to an empty string and prevents any message from displaying. |
unknownLinkFormat | string | unknown or offline destination gate | v7.0+ | Specifies the message to be displayed to a player when a gate's destination is not currently available. A value of "-" sets the message to an empty string and prevents any message from displaying. |
These options are specific to BLOCK type gates:
Option | Type | Default | Version | Description |
restoreOnClose | boolean | false | All | When a gate opens, the "open" blocks replace any blocks already in the same locations. If this setting is true, the replaced blocks will be restored when the gate is closed. |
These options are specific to AREA type gates:
Option | Type | Default | Version | Description |
box | boolean | false | v8.0+ | Show a "box" of material on all sides of the volume of the gate portal. |
boxMaterial | string | GLASS | v8.0+ | The material to use for the visible "box". |
p1 | string | none | v8.0+ | The X,Y,Z coordinates of the first corner of the gate's portal volume. |
p2 | string | none | v8.0+ | The X,Y,Z coordinates of the second corner of the gate's portal volume. |
spawnAir | boolean | false | v8.0+ | Should arriving player's be allowed to spawn with air under their feet? |
spawnDirection | string | PLAYER | v8.0+ | The direction an arriving player should be facing when they arrive. See the Spawn Direction section on the Designs page for more information. |
spawnLiquid | boolean | false | v8.0+ | Should arriving player's be allowed to spawn in liquids? |
spawnSearch | string | UPDOWN | v8.0+ | The direction the plugin should search for a suitable spawn location when the initial spawnlocation is not allowed because of other options. Valid values are UP, DOWN, UPDOWN, and DOWNUP. If no suitable location can be found, another random location within the portal volume will be chosen. |
spawnSolid | boolean | false | v8.0+ | Should arriving player's be allowed to spawn in solids? |
Server gates don't have any specific options.