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 theRegion
where the event occurred.double
The distance between the first and second position.org.spongepowered.api.entity.Entity
Get theEntity
that is the target of the event.Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>
Get theServerPlayer
that is the target of the event.default Region
Get theRegion
where the event occurred.Optional<org.spongepowered.api.entity.Entity>
Getting an entity with another entity riding on it.org.spongepowered.api.event.entity.MoveEntityEvent
Get 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.boolean
Get fly protect result.boolean
Get riding protect result.boolean
isPortal()
Does the entity use a portal.boolean
isRiding()
Whether the entity is riding anything.void
setAllowFly
(boolean allow) Set fly protect result.void
setAllowRiding
(boolean allow) Set riding protect result.void
setDestinationPosition
(org.spongepowered.math.vector.Vector3d vector3d) Setting the position to which the entity will be moved.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.void
setStopRidingMessage
(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, setCancelled
Methods inherited from interface org.spongepowered.api.event.Event
cause, context, source
Methods inherited from interface sawfowl.regionguard.api.events.world.RegionWorldEvent
getWorld
-
Method Details
-
getSpongeEvent
org.spongepowered.api.event.entity.MoveEntityEvent getSpongeEvent()Get theMoveEntityEvent
.- Specified by:
getSpongeEvent
in interfaceRegionWorldEvent
-
getEntity
org.spongepowered.api.entity.Entity getEntity()Get theEntity
that is the target of the event.- Returns:
- entity
-
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()Get theServerPlayer
that 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 theRegion
where 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:RegionWorldEvent
Get theRegion
where the event occurred.- Specified by:
getRegion
in interfaceRegionWorldEvent
-