diff --git a/paper-api/src/main/java/org/bukkit/event/block/Action.java b/paper-api/src/main/java/org/bukkit/event/block/Action.java index 25d26e3fe7..f0b672bbfc 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/Action.java +++ b/paper-api/src/main/java/org/bukkit/event/block/Action.java @@ -29,5 +29,25 @@ public enum Action { *
  • Triggering tripwire * */ - PHYSICAL, + // Paper start + PHYSICAL; + + /** + * Gets whether this action is a result of a left click. + * + * @return Whether it's a left click + */ + public boolean isLeftClick() { + return this == LEFT_CLICK_AIR || this == LEFT_CLICK_BLOCK; + } + + /** + * Gets whether this action is a result of a right click. + * + * @return Whether it's a right click + */ + public boolean isRightClick() { + return this == RIGHT_CLICK_AIR || this == RIGHT_CLICK_BLOCK; + } + // Paper end }