Class MVPortalEvent

java.lang.Object
org.bukkit.event.Event
org.mvplugins.multiverse.portals.event.MVPortalEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class MVPortalEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Multiverse 2
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    MVPortalEvent(org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> destination, org.bukkit.entity.Player teleportee)
     
    MVPortalEvent(org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> destination, org.bukkit.entity.Player teleportee, MVPortal sendingPortal)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.mvplugins.multiverse.core.destination.DestinationInstance<?,?>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Portals can have different types of actions, not just destinations.
    org.bukkit.Location
    Returns the location the player was before the teleport.
    static org.bukkit.event.HandlerList
    Gets the handler list.
    org.bukkit.event.HandlerList
    Deprecated.
    Use MVPortal.getPortalType() instead (i.e.
    Returns the Portal sending the player
    org.bukkit.entity.Player
    Returns the player who will be teleported by this event.
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    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

    • MVPortalEvent

      public MVPortalEvent(org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> destination, org.bukkit.entity.Player teleportee, MVPortal sendingPortal)
    • MVPortalEvent

      public MVPortalEvent(org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> destination, org.bukkit.entity.Player teleportee)
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets the handler list. This is required by the event system.
      Returns:
      A list of HANDLERS.
    • getTeleportee

      public org.bukkit.entity.Player getTeleportee()
      Returns the player who will be teleported by this event.
      Returns:
      The player who will be teleported by this event.
    • getFrom

      public org.bukkit.Location getFrom()
      Returns the location the player was before the teleport.
      Returns:
      The location the player was before the teleport.
    • getDestination

      @Deprecated(since="5.2", forRemoval=true) @ScheduledForRemoval(inVersion="6.0") public org.mvplugins.multiverse.core.destination.DestinationInstance<?,?> getDestination()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Portals can have different types of actions, not just destinations. See ActionHandlerProvider
      Returns the destination that the player will spawn at.
      Returns:
      The destination the player will spawn at. May be null.
    • getPortalType

      @Deprecated public PortalType getPortalType() throws IllegalStateException
      Deprecated.
      Use MVPortal.getPortalType() instead (i.e. getSendingPortal().getPortalType()).
      Returns the type of portal that was used. This will be Legacy for MV1 style portals and Normal for Portals that use the swirly purple goo.
      Returns:
      The PortalType of the sending portal.
      Throws:
      IllegalStateException - If this portal's location is no longer valid.
    • getSendingPortal

      public MVPortal getSendingPortal()
      Returns the Portal sending the player
      Returns:
      The portal the player is sent from
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable