2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								From: Madeline Miller <mnmiller1@me.com>
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Date: Sun, 29 Aug 2021 17:00:56 +1000
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-24 20:24:51 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Subject: [PATCH] Add helpers for left/right click to Action
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								diff --git a/src/main/java/org/bukkit/event/block/Action.java b/src/main/java/org/bukkit/event/block/Action.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								--- a/src/main/java/org/bukkit/event/block/Action.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ b/src/main/java/org/bukkit/event/block/Action.java
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								@@ -0,0 +0,0 @@ public enum Action {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      * <li>Triggering tripwire
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      * </ul>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								-    PHYSICAL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    // Paper start
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    PHYSICAL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    /**
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * Gets whether this action is a result of a left click.
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     *
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * @return Whether it's a left click
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     */
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    public boolean isLeftClick() {
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        return this == LEFT_CLICK_AIR || this == LEFT_CLICK_BLOCK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    /**
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * Gets whether this action is a result of a right click.
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     *
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+     * @return Whether it's a right click
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+     */
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 17:20:14 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+    public boolean isRightClick() {
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-29 16:29:36 +10:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+        return this == RIGHT_CLICK_AIR || this == RIGHT_CLICK_BLOCK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+    // Paper end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 |