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
ConstructorsConstructorDescriptionMVPortalEvent(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 TypeMethodDescriptionorg.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.LocationgetFrom()Returns the location the player was before the teleport.static org.bukkit.event.HandlerListGets the handler list.org.bukkit.event.HandlerListDeprecated.UseMVPortal.getPortalType()instead (i.e.Returns the Portal sending the playerorg.bukkit.entity.PlayerReturns the player who will be teleported by this event.booleanvoidsetCancelled(boolean cancelled) Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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:
getHandlersin classorg.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. SeeActionHandlerProviderReturns the destination that the player will spawn at.- Returns:
- The destination the player will spawn at. May be null.
-
getPortalType
Deprecated.UseMVPortal.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
PortalTypeof the sending portal. - Throws:
IllegalStateException- If this portal's location is no longer valid.
-
getSendingPortal
Returns the Portal sending the player- Returns:
- The portal the player is sent from
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-