Interface RegionEntityChangeWorldEvent
- All Superinterfaces:
org.spongepowered.api.event.Cancellable,org.spongepowered.api.event.Event,RegionMessageEvent,RegionWorldEvent
-
Method Summary
Modifier and TypeMethodDescriptionGet theRegionwhere the event occurred.Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>Get theServerPlayerthat is the target of the event.default RegionGet theRegionwhere the event occurred.org.spongepowered.api.event.entity.ChangeEntityWorldEvent.RepositionGetting 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.ServerWorldbooleanGet fly protect result.booleanGet protect result.booleanGet protect result.voidsetAllowFly(boolean allow) Set fly protect result.voidsetStopFlyingMessage(net.kyori.adventure.text.Component component) Set the message that will be sent to the player if the region is forbidden to fly.toRegion()Get theRegionwhere the event occurred.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.RegionMessageEvent
getMessage, setMessageMethods 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 theRegionwhere the event occurred. -
toRegion
Region toRegion()Get theRegionwhere the event occurred. -
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()Get theServerPlayerthat is the target of the event.- Specified by:
getPlayerin interfaceRegionMessageEvent- 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:RegionWorldEventGetting the Sponge event.
May be `null` if the original event is not a Sponge event.- Specified by:
getSpongeEventin interfaceRegionWorldEvent
-
getRegion
Description copied from interface:RegionWorldEventGet theRegionwhere the event occurred.- Specified by:
getRegionin interfaceRegionWorldEvent
-
getTargetWorld
org.spongepowered.api.world.server.ServerWorld getTargetWorld()
-