Skip to main content

Portals

Portals teleport a player that enters the specified region to an exact location, by a certain offset amount or to a random location inside a region.

The position and direction attributes of a portal are relative to the players location and where they are looking. Prefix these values with an at symbol @ to specify absolute values. Portals can be restricted to certain teams by defining their filter attribute.

Portals respond to any player move event, this allows almost instant teleportation as soon as the player matches the portals filter.

tip

Copy the yaw and pitch from the Debug screen (F3) in Minecraft (the Facing: Direction (Axis) (Yaw/Pitch) line).

ElementDescription
<portals> </portals>Node containing the portals on this map.
Sub-elementsValue/Children
<portal>An individual portal node.Portal Sub-elements

Portal Attributes

AttributeDescriptionValueDefault
x,y,zOffset the players X,Y,Z position by the amount specified.Number
regionPropertyRegion where this portals entrance is located.
Cannot combine an entrance region with forward or transit properties.
Region
destinationPropertyDestination of the portal, teleports players to a random point inside the region.
Cannot combine an exit region with reverse or transit properties.
Randomize-able Region
filterPropertyFilter portal player access.Filteralways
soundPlay the portal sound.true/falsetrue
protectProtect the portal entrance and exit regions.true/falsefalse
bidirectionalCreates a dual-linked portal that goes both ways. This can only be used when all coordinates and directions are relative.true/falsefalse
smoothSmoothly teleport players.true/falsefalse
yawSpecify the direction the player is looking horizontally from -180° to 180°.
South 0°, East -90°, North 180°, and West 90°.
Number
pitchSpecify the direction the player is looking vertically from -90° to 90°.
-90° is straight up, 90° is straight down.
Number
forwardPropertyApply forward transform on rising edge.Dynamic Filter
reversePropertyApply reverse transform on rising edge.Dynamic Filter
transitPropertyApply forward transform on rising edge and reverse transform on falling edge.
Cannot combine transit property with forward or reverse properties.
Dynamic Filter
observersPropertyFilter portal observer access.Filter

Examples

<portals>
<!-- Moves the player to exactly X:10 Y:8 Z:45, pitch & yaw remain unchanged -->
<portal x="@10" y="@8" z="@45">
<region>
<cuboid min="-56,33,-1" max="-55,35,2"/>
</region>
</portal>

<!-- Adds 12 to the players Z position, turning them to face east and 10° up -->
<portal z="12" pitch="@10" yaw="@-90">
<region>
<cuboid min="-56,33,-1" max="-55,35,2"/>
</region>
</portal>

<!-- Teleport the player from portal-entrance to a random point inside portal-exit -->
<portal region="portal-entrance" destination="portal-exit"/>

<!-- Teleports players on the Red Team from score-box to red-spawn, facing west -->
<portal filter="only-red" yaw="@90" region="score-box" destination="red-spawn"/>
</portals>

Dynamic Portals

Dynamic portals are portals that use Dynamic Filters to determine who is allowed entrance to a portal. Dynamic portals will always track when a condition is met, rather than standard portals, which can only track when a condition is met at the moment a player enters the portal. This means that dynamic portals can, for example, immediately teleport players 10 minutes into a match.

In this example, the dynamic portal will teleport red players inside the red-rear region to the red-front region five minutes into the match. Red players who enter and remain in the region before the five minutes will still be teleported.

<portals>
<!-- A one-way (entrance to destination) Dynamic Portal -->
<!-- forward takes a dynamic filter as input -->
<portal forward="dynamic-filter-red" destination="red-front"/>
</portals>
<filters>
<all id="dynamic-filter-red">
<team>red-team</team>
<time>5m</time>
<!-- The entrance region is described inside the filter -->
<region id="red-rear"/>
</all>
</filters>
<regions>
<cuboid id="red-rear" min="10,20,30" max="15,25,35"/>
<cuboid id="red-front" min="50,20,30" max="55,25,35"/>
</regions>