mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-19 21:06:03 +00:00
SPIGOT-4793: Clarify cancelled behaviour of PlayerInteractEvent
This commit is contained in:
parent
ad5d102589
commit
c5032913d3
1 changed files with 7 additions and 0 deletions
|
@ -66,7 +66,14 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
|
||||||
* prevent buckets from placing water and so forth
|
* prevent buckets from placing water and so forth
|
||||||
*
|
*
|
||||||
* @return boolean cancellation state
|
* @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() {
|
public boolean isCancelled() {
|
||||||
return useInteractedBlock() == Result.DENY;
|
return useInteractedBlock() == Result.DENY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue