Interface InteractBlockEvent.Secondary
-
- All Superinterfaces:
Cancellable,Event,InteractBlockEvent,InteractEvent
- Enclosing interface:
- InteractBlockEvent
public static interface InteractBlockEvent.Secondary extends InteractBlockEvent, Cancellable
An event where the targeted block is being interacted with the client's "secondary" button.This is usually right-click.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
InteractBlockEvent.Primary, InteractBlockEvent.Secondary
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vector3dinteractionPoint()Gets the point of interaction where the interaction occurred as aVector3d.TristateoriginalUseBlockResult()Gets the originaluseBlockResult().TristateoriginalUseItemResult()voidsetUseBlockResult(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.TristateuseBlockResult()Gets whether the interactedBlockSnapshotshould be used.TristateuseItemResult()Gets 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, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.block.InteractBlockEvent
block, targetSide
-
-
-
-
Method Detail
-
originalUseItemResult
Tristate originalUseItemResult()
-
originalUseBlockResult
Tristate originalUseBlockResult()
Gets the originaluseBlockResult().- Returns:
- The original
useBlockResult()
-
useItemResult
Tristate useItemResult()
Gets 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.
- Returns:
- Whether the
ArmorEquipable.itemInHand(java.util.function.Supplier<? extends org.spongepowered.api.data.type.HandType>)should be used
- FALSE: The
-
useBlockResult
Tristate useBlockResult()
Gets 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.
- Returns:
- Whether the interacted
BlockSnapshotshould be used
- FALSE:
-
setUseItemResult
void setUseItemResult(Tristate result)
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
void setUseBlockResult(Tristate result)
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:
-
-