Skip to content
Kristian Knarvik edited this page Oct 30, 2021 · 1 revision

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.

TEMPORARY WIKI

Relevant for LEGACY versions of SG (<1.X.X.X).
An ongoing rewrite will soon be replacing this.
Please see our Discord for more info/support!

Clone this wiki locally