Interface RegionMoveEntityEvent

All Superinterfaces:
org.spongepowered.api.event.Cancellable, org.spongepowered.api.event.Event, RegionWorldEvent
All Known Subinterfaces:
RegionMoveEntityEvent.ChangeRegion

public interface RegionMoveEntityEvent extends RegionWorldEvent
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the Region where the event occurred.
    double
    The distance between the first and second position.
    org.spongepowered.api.entity.Entity
    Get the Entity that is the target of the event.
    Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>
    Get the ServerPlayer that is the target of the event.
    default Region
    Get the Region 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 the MoveEntityEvent.
    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
    Does the entity use a portal.
    boolean
    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 the MoveEntityEvent.
      Specified by:
      getSpongeEvent in interface RegionWorldEvent
    • getEntity

      org.spongepowered.api.entity.Entity getEntity()
      Get the Entity that is the target of the event.
      Returns:
      entity
    • getPlayer

      Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()
      Get the ServerPlayer 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 the Region 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

      default Region getRegion()
      Description copied from interface: RegionWorldEvent
      Get the Region where the event occurred.
      Specified by:
      getRegion in interface RegionWorldEvent