Interface RegionEntityChangeWorldEvent

All Superinterfaces:
org.spongepowered.api.event.Cancellable, org.spongepowered.api.event.Event, RegionMessageEvent, RegionWorldEvent

public interface RegionEntityChangeWorldEvent extends RegionWorldEvent, RegionMessageEvent
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the Region where the event occurred.
    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.
    org.spongepowered.api.event.entity.ChangeEntityWorldEvent.Reposition
    Getting the Sponge event.
    May be `null` if the original event is not a Sponge event.
    Optional<net.kyori.adventure.text.Component>
    Receiving a message that will be sent to the player if flights are forbidden in the region.
    org.spongepowered.api.world.server.ServerWorld
     
    boolean
    Get fly protect result.
    boolean
    Get protect result.
    boolean
    Get protect result.
    void
    setAllowFly(boolean allow)
    Set fly protect result.
    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.
    Get the Region where the event occurred.

    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.RegionMessageEvent

    getMessage, setMessage

    Methods inherited from interface sawfowl.regionguard.api.events.world.RegionWorldEvent

    getWorld
  • Method Details

    • isAllowFrom

      boolean isAllowFrom()
      Get protect result.
    • isAllowTo

      boolean isAllowTo()
      Get protect result.
    • fromRegion

      Region fromRegion()
      Get the Region where the event occurred.
    • toRegion

      Region toRegion()
      Get the Region where the event occurred.
    • getPlayer

      Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()
      Get the ServerPlayer that is the target of the event.
      Specified by:
      getPlayer in interface RegionMessageEvent
      Returns:
      entity
    • isAllowFly

      boolean isAllowFly()
      Get fly protect result.
    • setAllowFly

      void setAllowFly(boolean allow)
      Set fly protect result.
    • 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.
    • getSpongeEvent

      org.spongepowered.api.event.entity.ChangeEntityWorldEvent.Reposition getSpongeEvent()
      Description copied from interface: RegionWorldEvent
      Getting the Sponge event.
      May be `null` if the original event is not a Sponge event.
      Specified by:
      getSpongeEvent in interface RegionWorldEvent
    • getRegion

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

      org.spongepowered.api.world.server.ServerWorld getTargetWorld()