CompletePortal

CompletePortal is used to represent an actual built portal in the world

Creating a new portal

When creating a new portal, you want to use:

Dimensions#getCompletePortalManager()#createNew()

If the portal is ready to be used. Otherwise, Dimensions will not count the portal and not teleport players.

Unless (for example) you want to create a temporary portal that will only exist as a placeholder for a forced teleport location.

Portal tags

Portal tags are used to store data in the portal

For example the HubWorld addon stores the return location of players as a tag

Is Active

When you run a task for a portal but it's not necessary to run while the portal is not active (the chunk is not loaded), then you should use CompletePortal#isActive

Last updated