Interface InteractBlockEvent.Secondary.Pre
- All Superinterfaces:
Cancellable,Event,InteractBlockEvent,InteractBlockEvent.Secondary,InteractEvent
- Enclosing interface:
InteractBlockEvent.Secondary
public static interface InteractBlockEvent.Secondary.Pre
extends InteractBlockEvent.Secondary, Cancellable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
InteractBlockEvent.Primary, InteractBlockEvent.SecondaryNested classes/interfaces inherited from interface org.spongepowered.api.event.block.InteractBlockEvent.Secondary
InteractBlockEvent.Secondary.Post, InteractBlockEvent.Secondary.Pre -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUseBlockResult(Tristate result) Sets whether the interactedBlockSnapshotshould be used.voidsetUseItemResult(Tristate result) Sets whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)should be used.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
block, targetSideMethods inherited from interface org.spongepowered.api.event.block.InteractBlockEvent.Secondary
interactionPoint, originalUseBlockResult, originalUseItemResult, useBlockResult, useItemResult
-
Method Details
-
setUseItemResult
Sets whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)should be used.- FALSE: The
ItemStackwill never be used. - UNDEFINED: The
ItemStackwill be used if the block fails. - TRUE: The
ItemStackwill always be used.
Note: These results may differ depending on implementation.
- Parameters:
result- Whether theArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)should be used
- FALSE: The
-
setUseBlockResult
Sets whether the interactedBlockSnapshotshould be used.- FALSE:
BlockSnapshotwill never be used. - UNDEFINED:
BlockSnapshotwill be used as normal. - TRUE:
BlockSnapshotwill always be used.
Note: These results may differ depending on implementation.
- Parameters:
result- Whether the interactedBlockSnapshotshould be used
- FALSE:
-