Class StargateTeleportPortalEvent

java.lang.Object
org.bukkit.event.Event

public class StargateTeleportPortalEvent extends StargateEntityPortalEvent
This event should be called whenever a non-player teleports through a stargate

This event can be used to overwrite the location the entity is teleported to.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    StargateTeleportPortalEvent(@NotNull org.bukkit.entity.Entity travellingEntity, @NotNull Portal portal, Portal destination, @NotNull org.bukkit.Location exit)
    Instantiates a new stargate portal event
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the destination portal
    org.bukkit.Location
    Gets the location the entity is about to be teleported to
    static org.bukkit.event.HandlerList
    Gets a handler-list containing all event handlers
    @NotNull org.bukkit.event.HandlerList
     
    void
    setExit(@NotNull org.bukkit.Location location)
    Set the location the entity should exit from

    Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent

    getEntity

    Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEvent

    getPortal

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StargateTeleportPortalEvent

      public StargateTeleportPortalEvent(@NotNull @NotNull org.bukkit.entity.Entity travellingEntity, @NotNull @NotNull Portal portal, Portal destination, @NotNull @NotNull org.bukkit.Location exit)
      Instantiates a new stargate portal event
      Parameters:
      travellingEntity -

      The entity travelling through a portal

      portal -

      The portal the entity entered from

      destination -

      The destination the entity should exit from

      exit -

      The exit location of the destination portal the entity will be teleported to

  • Method Details

    • getDestination

      public Portal getDestination()
      Gets the destination portal
      Returns:

      The destination portal

    • getExit

      public org.bukkit.Location getExit()
      Gets the location the entity is about to be teleported to
      Returns:

      The location the entity should exit from the portal

    • setExit

      public void setExit(@NotNull @NotNull org.bukkit.Location location)
      Set the location the entity should exit from
      Parameters:
      location -

      The new location the entity should exit from.

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets a handler-list containing all event handlers
      Returns:

      A handler-list with all event handlers

    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event