org.bukkit.event.entity
Class EntityPortalExitEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.entity.EntityEvent
          extended by org.bukkit.event.entity.EntityTeleportEvent
              extended by org.bukkit.event.entity.EntityPortalExitEvent
All Implemented Interfaces:
Cancellable

public class EntityPortalExitEvent
extends EntityTeleportEvent

Called before an entity exits a portal.

This event allows you to modify the velocity of the entity after they have successfully exeted the portal.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity
 
Constructor Summary
EntityPortalExitEvent(Entity entity, Location from, Location to, Vector before, Vector after)
           
 
Method Summary
 Vector getAfter()
          Gets a copy of the velocity that the entity will have after exiting the portal.
 Vector getBefore()
          Gets a copy of the velocity that the entity has before entering the portal.
static HandlerList getHandlerList()
           
 HandlerList getHandlers()
           
 void setAfter(Vector after)
          Sets the velocity that the entity will have after exiting the portal.
 
Methods inherited from class org.bukkit.event.entity.EntityTeleportEvent
getFrom, getTo, isCancelled, setCancelled, setFrom, setTo
 
Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityPortalExitEvent

public EntityPortalExitEvent(Entity entity,
                             Location from,
                             Location to,
                             Vector before,
                             Vector after)
Method Detail

getBefore

public Vector getBefore()
Gets a copy of the velocity that the entity has before entering the portal.

Returns:
velocity of entity before entering portal

getAfter

public Vector getAfter()
Gets a copy of the velocity that the entity will have after exiting the portal.

Returns:
velocity of entity after exiting portal

setAfter

public void setAfter(Vector after)
Sets the velocity that the entity will have after exiting the portal.


getHandlers

public HandlerList getHandlers()
Overrides:
getHandlers in class EntityTeleportEvent

getHandlerList

public static HandlerList getHandlerList()


Copyright © 2013. All Rights Reserved.