Interface RegionChangeBlockEvent.Break
- All Superinterfaces:
org.spongepowered.api.event.Cancellable
,org.spongepowered.api.event.Event
,RegionChangeBlockEvent
,RegionMessageEvent
,RegionWorldEvent
- Enclosing interface:
- RegionChangeBlockEvent
public static interface RegionChangeBlockEvent.Break
extends RegionChangeBlockEvent, RegionMessageEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface sawfowl.regionguard.api.events.world.RegionChangeBlockEvent
RegionChangeBlockEvent.Break, RegionChangeBlockEvent.LiquidFlow, RegionChangeBlockEvent.Place
-
Method Summary
Modifier and TypeMethodDescriptionorg.spongepowered.api.block.BlockSnapshot
Gets the default replacement snapshot.org.spongepowered.api.block.BlockSnapshot
Gets the original snapshot.org.spongepowered.api.block.transaction.BlockTransaction
Get defaultTransaction
for this event.org.spongepowered.api.entity.Entity
Get the entity that is the source of the event.Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer>
Getting the player if he is the cause of the event.List<org.spongepowered.api.block.transaction.BlockTransaction>
Gets a list of theTransaction
s for this event.boolean
Get protect result.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.Event
context, source
Methods inherited from interface sawfowl.regionguard.api.events.world.RegionChangeBlockEvent
cause, getSpongeEvent
Methods inherited from interface sawfowl.regionguard.api.events.world.RegionMessageEvent
getMessage, setMessage
Methods inherited from interface sawfowl.regionguard.api.events.world.RegionWorldEvent
getRegion, getWorld
-
Method Details
-
getEntity
org.spongepowered.api.entity.Entity getEntity()Get the entity that is the source of the event.- Returns:
- entity
-
getPlayer
Optional<org.spongepowered.api.entity.living.player.server.ServerPlayer> getPlayer()Getting the player if he is the cause of the event.- Specified by:
getPlayer
in interfaceRegionMessageEvent
-
isAllowBreak
boolean isAllowBreak()Get protect result. -
getTransactions
List<org.spongepowered.api.block.transaction.BlockTransaction> getTransactions()Gets a list of theTransaction
s for this event. If a transaction is requested to be marked as "invalid",Transaction.setValid(boolean)
can be used.- Returns:
- The unmodifiable list of transactions
-
getDefaultTransaction
org.spongepowered.api.block.transaction.BlockTransaction getDefaultTransaction()Get defaultTransaction
for this event. If a transaction is requested to be marked as "invalid",Transaction.setValid(boolean)
can be used.- Returns:
- transaction
-
afterTransaction
org.spongepowered.api.block.BlockSnapshot afterTransaction()Gets the default replacement snapshot.- Returns:
- The default replacement
-
beforeTransaction
org.spongepowered.api.block.BlockSnapshot beforeTransaction()Gets the original snapshot.- Returns:
- The original snapshot
-