Interface RegionMoveEntityEvent
- All Superinterfaces:
org.spongepowered.api.event.Cancellable,org.spongepowered.api.event.Event,RegionWorldEvent
- All Known Subinterfaces:
RegionMoveEntityEvent.ChangeRegion
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGet theRegionwhere the event occurred.doubleThe distance between the first and second position.org.spongepowered.api.entity.EntityGet theEntitythat is the target of the event.Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>Get theServerPlayerthat is the target of the event.default RegionGet theRegionwhere the event occurred.Optional<org.spongepowered.api.entity.Entity>Getting an entity with another entity riding on it.org.spongepowered.api.event.entity.MoveEntityEventGet theMoveEntityEvent.Optional<net.kyori.adventure.text.Component>Receiving a message that will be sent to the player if flights are forbidden in the region.Optional<net.kyori.adventure.text.Component>Receiving a message that will be sent to the player if riding are forbidden in the region.booleanGet fly protect result.booleanGet riding protect result.booleanisPortal()Does the entity use a portal.booleanisRiding()Whether the entity is riding anything.voidsetAllowFly(boolean allow) Set fly protect result.voidsetAllowRiding(boolean allow) Set riding protect result.voidsetDestinationPosition(org.spongepowered.math.vector.Vector3d vector3d) Setting the position to which the entity will be moved.voidsetStopFlyingMessage(net.kyori.adventure.text.Component component) Set the message that will be sent to the player if the region is forbidden to fly.voidsetStopRidingMessage(net.kyori.adventure.text.Component component) Set the message that will be sent to the player if riding are forbidden in region.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.Event
cause, context, sourceMethods inherited from interface sawfowl.regionguard.api.events.world.RegionWorldEvent
getWorld
-
Method Details
-
getSpongeEvent
org.spongepowered.api.event.entity.MoveEntityEvent getSpongeEvent()Get theMoveEntityEvent.- Specified by:
getSpongeEventin interfaceRegionWorldEvent
-
getEntity
org.spongepowered.api.entity.Entity getEntity()Get theEntitythat is the target of the event.- Returns:
- entity
-
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()Get theServerPlayerthat is the target of the event.- Returns:
- entity
-
isAllowFly
boolean isAllowFly()Get fly protect result. -
setAllowFly
void setAllowFly(boolean allow) Set fly protect result. -
setDestinationPosition
void setDestinationPosition(org.spongepowered.math.vector.Vector3d vector3d) Setting the position to which the entity will be moved. -
getDistanceSquared
double getDistanceSquared()The distance between the first and second position. -
fromRegion
Region fromRegion()Get theRegionwhere the event occurred. -
getStopFlyingMessage
Optional<net.kyori.adventure.text.Component> getStopFlyingMessage()Receiving a message that will be sent to the player if flights are forbidden in the region. -
setStopFlyingMessage
void setStopFlyingMessage(net.kyori.adventure.text.Component component) Set the message that will be sent to the player if the region is forbidden to fly. -
getStopRidingMessage
Optional<net.kyori.adventure.text.Component> getStopRidingMessage()Receiving a message that will be sent to the player if riding are forbidden in the region. -
setStopRidingMessage
void setStopRidingMessage(net.kyori.adventure.text.Component component) Set the message that will be sent to the player if riding are forbidden in region. -
isRiding
boolean isRiding()Whether the entity is riding anything. -
isPortal
boolean isPortal()Does the entity use a portal. -
isAllowRiding
boolean isAllowRiding()Get riding protect result. -
setAllowRiding
void setAllowRiding(boolean allow) Set riding protect result. -
getRidingEntity
Optional<org.spongepowered.api.entity.Entity> getRidingEntity()Getting an entity with another entity riding on it. -
getRegion
Description copied from interface:RegionWorldEventGet theRegionwhere the event occurred.- Specified by:
getRegionin interfaceRegionWorldEvent
-