Update InteractEventExtensions.kt

This commit is contained in:
bluefireoly
2020-10-30 20:33:18 +01:00
parent 95dfce9089
commit fb51709f0a

View File

@@ -28,12 +28,12 @@ val PlayerInteractEntityEvent.interactItem: ItemStack?
/**
* @return True, if the action was a left mouse button click.
*/
val PlayerInteractEvent.isLeftClick get() = action == Action.LEFT_CLICK_BLOCK || action == Action.LEFT_CLICK_AIR
val Action.isLeftClick get() = this == Action.LEFT_CLICK_BLOCK || this == Action.LEFT_CLICK_AIR
/**
* @return True, if the action was a right mouse button click.
*/
val PlayerInteractEvent.isRightClick get() = action == Action.RIGHT_CLICK_BLOCK || action == Action.RIGHT_CLICK_AIR
val Action.isRightClick get() = this == Action.RIGHT_CLICK_BLOCK || this == Action.RIGHT_CLICK_AIR
@UnsafeImplementation
val PlayerInteractEvent.clickedBlockExceptAir: Block?