Package org.bukkit.event.player
Class PlayerBucketEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerBucketEvent
- All Implemented Interfaces:
- Cancellable
- Direct Known Subclasses:
- PlayerBucketEmptyEvent,- PlayerBucketFillEvent
Called when a player interacts with a Bucket
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerBucketEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated.PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated.PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand) 
- 
Method SummaryModifier and TypeMethodDescriptiongetBlock()Gets the block involved in this event.Return the block clickedGet the face on the clicked blockReturns the bucket used in this eventgetHand()Get the hand that was used in this event.Get the resulting item in hand after the bucket eventbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetItemStack(@Nullable ItemStack itemStack) Set the item in hand after the eventMethods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, getHandlers, isAsynchronous
- 
Constructor Details- 
PlayerBucketEvent@Deprecated public PlayerBucketEvent(@NotNull @NotNull Player who, @NotNull @NotNull Block blockClicked, @NotNull @NotNull BlockFace blockFace, @NotNull @NotNull Material bucket, @NotNull @NotNull ItemStack itemInHand) Deprecated.
- 
PlayerBucketEvent@Deprecated public PlayerBucketEvent(@NotNull @NotNull Player who, @NotNull @NotNull Block block, @NotNull @NotNull Block blockClicked, @NotNull @NotNull BlockFace blockFace, @NotNull @NotNull Material bucket, @NotNull @NotNull ItemStack itemInHand) Deprecated.
- 
PlayerBucketEvent
 
- 
- 
Method Details- 
getBucketReturns the bucket used in this event- Returns:
- the used bucket
 
- 
getItemStackGet the resulting item in hand after the bucket event- Returns:
- ItemStack hold in hand after the event.
 
- 
setItemStackSet the item in hand after the event- Parameters:
- itemStack- the new held ItemStack after the bucket event.
 
- 
getBlockGets the block involved in this event.- Returns:
- The Block which block is involved in this event
 
- 
getBlockClickedReturn the block clicked- Returns:
- the clicked block
 
- 
getBlockFaceGet the face on the clicked block- Returns:
- the clicked face
 
- 
getHandGet the hand that was used in this event.- Returns:
- the hand
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
 
-