From d66310a2f11dbf9bd82ba1815f755ecd65d274ed Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 28 Apr 2019 11:24:18 +1000 Subject: [PATCH] SPIGOT-4793: Clarify cancelled behaviour of PlayerInteractEvent By: md_5 --- .../java/org/bukkit/event/player/PlayerInteractEvent.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java index 0320c015fe..6708c564f8 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java @@ -66,7 +66,14 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable { * prevent buckets from placing water and so forth * * @return boolean cancellation state + * @deprecated This event has two possible cancellation states, one for + * {@link #useInteractedBlock()} and one for {@link #useItemInHand()}. It is + * possible a call might have the former false, but the latter true, eg in + * the case of using a firework whilst gliding. Callers should check the + * relevant methods individually. */ + @Deprecated + @Override public boolean isCancelled() { return useInteractedBlock() == Result.DENY; }