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.BlockSnapshotGets the default replacement snapshot.org.spongepowered.api.block.BlockSnapshotGets the original snapshot.org.spongepowered.api.block.transaction.BlockTransactionGet defaultTransactionfor this event.org.spongepowered.api.entity.EntityGet 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 theTransactions for this event.booleanGet protect result.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.Event
context, sourceMethods inherited from interface sawfowl.regionguard.api.events.world.RegionChangeBlockEvent
cause, getSpongeEventMethods inherited from interface sawfowl.regionguard.api.events.world.RegionMessageEvent
getMessage, setMessageMethods 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:
getPlayerin interfaceRegionMessageEvent
-
isAllowBreak
boolean isAllowBreak()Get protect result. -
getTransactions
List<org.spongepowered.api.block.transaction.BlockTransaction> getTransactions()Gets a list of theTransactions 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 defaultTransactionfor 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
-