mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 03:35:51 -07:00
SPIGOT-4793: Clarify cancelled behaviour of PlayerInteractEvent
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user