Dimensions API
  • Setting up
  • Creating an addon
  • Example Addon
  • Reference
    • API Reference
      • CustomPortal
      • CompletePortal
      • PortalGeometry
      • Events
Powered by GitBook
On this page
  • CustomPortalUseEvent
  • CustomPortalIgniteEvent
  • CustomPortalBreakEvent
  1. Reference
  2. API Reference

Events

PreviousPortalGeometry

Last updated 2 years ago

The event is fired when an entity or a player uses a portal and is ready to be teleported

If the event is cancelled the player will not be teleported

The event is fired when a portal is being ignited

If the event is canceled the portal will not be ignited

The event is fired when a portal is being broken

If the event is canceled the portal will not break

If you use the Dimensions#getCompletePortalManager()#removePortal()

Then you may want to revert the block states or the situation that caused the event because the portal will stay lit but the frame might be missing (in case you run the command when blocks break, etc)

CustomPortalUseEvent
CustomPortalIgniteEvent
CustomPortalBreakEvent