Package org.bukkit.event.entity
Class EntityPortalExitEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTeleportEvent
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 exited the portal.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description 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
-
Constructor Details
-
Method Details
-
getBefore
Gets a copy of the velocity that the entity has before entering the portal.- Returns:
- velocity of entity before entering the portal
-
getAfter
Gets a copy of the velocity that the entity will have after exiting the portal.- Returns:
- velocity of entity after exiting the portal
-
setAfter
Sets the velocity that the entity will have after exiting the portal.- Parameters:
after
- the velocity after exiting the portal
-
getHandlers
- Overrides:
getHandlers
in classEntityTeleportEvent
-
getHandlerList
-