Interface ChangeBlockEvent.Pre
- All Superinterfaces:
Cancellable
,ChangeBlockEvent
,Event
- Enclosing interface:
- ChangeBlockEvent
Called before running specific block logic at one or more
ServerLocation
's such as BlockTypes.WATER
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.block.ChangeBlockEvent
ChangeBlockEvent.All, ChangeBlockEvent.Post, ChangeBlockEvent.Pre
-
Method Summary
Modifier and TypeMethodDescriptionRepresents a list of one or moreServerLocation
's whereBlockState
changes can occur.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.block.ChangeBlockEvent
world
-
Method Details
-
locations
List<ServerLocation> locations()Represents a list of one or moreServerLocation
's whereBlockState
changes can occur.Canceling this event will prevent block logic from running and also stop
BlockSnapshot
's from being generated.Note: This event is not intended to always be fired before changing a
BlockState
but rather it is primarily used to prevent one or moreBlockState
's from being changed.- Returns:
- The immutable list of one or more locations that can change
-