Commits

Thinkofname authored be1f87c5718
Document PlayerInteractEvent's behavior for air
No tags

src/main/java/org/bukkit/event/player/PlayerInteractEvent.java

Modified
4 4 import org.bukkit.block.BlockFace;
5 5 import org.bukkit.event.HandlerList;
6 6 import org.bukkit.inventory.ItemStack;
7 7 import org.bukkit.Material;
8 8 import org.bukkit.entity.Player;
9 9 import org.bukkit.event.Cancellable;
10 10 import org.bukkit.event.block.Action;
11 11
12 12 /**
13 13 * Called when a player interacts with an object or air.
14 + * <p>
15 + * This event will fire as cancelled if the vanilla behavior
16 + * is to do nothing (e.g interacting with air)
14 17 */
15 18 public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
16 19 private static final HandlerList handlers = new HandlerList();
17 20 protected ItemStack item;
18 21 protected Action action;
19 22 protected Block blockClicked;
20 23 protected BlockFace blockFace;
21 24 private Result useClickedBlock;
22 25 private Result useItemInHand;
23 26

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut