Interface RegionEntityChangeWorldEvent
- All Superinterfaces:
org.spongepowered.api.event.Cancellable
,org.spongepowered.api.event.Event
,RegionMessageEvent
,RegionWorldEvent
-
Method Summary
Modifier and TypeMethodDescriptionGet theRegion
where the event occurred.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.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.toRegion()
Get theRegion
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 theRegion
where the event occurred. -
toRegion
Region toRegion()Get theRegion
where the event occurred. -
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()Get theServerPlayer
that is the target of the event.- Specified by:
getPlayer
in 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:RegionWorldEvent
Getting the Sponge event.
May be `null` if the original event is not a Sponge event.- Specified by:
getSpongeEvent
in interfaceRegionWorldEvent
-
getRegion
Description copied from interface:RegionWorldEvent
Get theRegion
where the event occurred.- Specified by:
getRegion
in interfaceRegionWorldEvent
-
getTargetWorld
org.spongepowered.api.world.server.ServerWorld getTargetWorld()
-