PlayerBucketEvent
extends PlayerEvent
in package
implements
Cancellable
Uses
CancellableTrait
Tags
Interfaces, Classes, Traits and Enums
- Cancellable
- This interface is implemented by an Event subclass if and only if it can be cancelled.
Table of Contents
- MAX_EVENT_CALL_DEPTH = 50
- $eventName : string|null
- $player : Player
- $blockClicked : Block
- $blockFace : int
- $bucket : Item
- $eventCallDepth : int
- $isCancelled : bool
- $item : Item
- __construct() : mixed
- call() : void
- Calls event handlers registered for this event.
- cancel() : void
- getBlockClicked() : Block
- getBlockFace() : int
- getBucket() : Item
- Returns the bucket used in this event
- getEventName() : string
- getItem() : Item
- Returns the item in hand after the event
- getPlayer() : Player
- isCancelled() : bool
- setItem() : void
- uncancel() : void
Constants
MAX_EVENT_CALL_DEPTH
private
mixed
MAX_EVENT_CALL_DEPTH
= 50
Properties
$eventName
protected
string|null
$eventName
= null
$player
protected
Player
$player
$blockClicked
private
Block
$blockClicked
$blockFace
private
int
$blockFace
$bucket
private
Item
$bucket
$eventCallDepth
private
static int
$eventCallDepth
= 1
$isCancelled
private
bool
$isCancelled
= false
$item
private
Item
$item
Methods
__construct()
public
__construct(Player $who, Block $blockClicked, int $blockFace, Item $bucket, Item $itemInHand) : mixed
Parameters
Return values
mixed —call()
Calls event handlers registered for this event.
public
call() : void
Tags
Return values
void —cancel()
public
cancel() : void
Return values
void —getBlockClicked()
public
getBlockClicked() : Block
Return values
Block —getBlockFace()
public
getBlockFace() : int
Return values
int —getBucket()
Returns the bucket used in this event
public
getBucket() : Item
Return values
Item —getEventName()
public
final getEventName() : string
Return values
string —getItem()
Returns the item in hand after the event
public
getItem() : Item
Return values
Item —getPlayer()
public
getPlayer() : Player
Return values
Player —isCancelled()
public
isCancelled() : bool
Return values
bool —setItem()
public
setItem(Item $item) : void
Parameters
- $item : Item
Return values
void —uncancel()
public
uncancel() : void