1
API
Kristian Knarvik edited this page 2021-10-30 06:27:20 +02:00
Table of Contents
API
Stargate has an API which allows other plugins to interact with available events. Here is an overview of how the different events can be used:
- The StargateAccessEvent is called whenever a player clicks a stargate's sign, and when a player enters a Stargate. It can be used to override whether the access should be allowed or denied.
- The StargateActivateEvent is called whenever a player activates a stargate (uses the stargate's sign). It can be used to override which destinations are available to the player.
- The StargateCloseEvent is called whenever a stargate is closed. Forcing the stargate closed can be toggled.
- The StargateCreateEvent is called whenever a new stargate is created. Its deny value can be overridden, the cost can be changed
- The StargateDeactivateEvent is called whenever a stargate is deactivated.
- The StargateDestroyEvent is called whenever a stargate is destroyed. Its deny value can be overridden or the cost can be changed.
- The StargateEntityPortalEvent is called whenever an entity teleports through a stargate. The exit location can be changed.
- The StargateOpenEvent is called whenever a stargate is opened. Forcing the stargate open can be toggled.
- The StargatePlayerPortalEvent is called whenever a player teleports through a stargate. The exit location can be changed.