Dimensions API
  • Setting up
  • Creating an addon
  • Example Addon
  • Reference
    • API Reference
      • CustomPortal
      • CompletePortal
      • PortalGeometry
      • Events
Powered by GitBook
On this page
  • Creating a new portal
  • Portal tags
  • Is Active
  1. Reference
  2. API Reference

CompletePortal

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

PreviousCustomPortalNextPortalGeometry

Last updated 2 years ago

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#setTag
CompletePortal#getTag
CompletePortal#isActive