Class endstone::PlayerBucketFillEvent¶
ClassList > endstone > PlayerBucketFillEvent
Called when a player fills a bucket.
#include <endstone/event/player/player_bucket_fill_event.h>
Inherits the following classes: endstone::PlayerBucketEvent
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerBucketFillEvent) |
|
| PlayerBucketEvent (const NotNull< Player > & player, const Nullable< Block > & block, const NotNull< Block > & block_clicked, BlockFace block_face, const ItemType & bucket, std::optional< ItemStack > item_stack, EquipmentSlot hand) |
Public Functions inherited from endstone::PlayerBucketEvent¶
See endstone::PlayerBucketEvent
| Type | Name |
|---|---|
| PlayerBucketEvent (const NotNull< Player > & player, const Nullable< Block > & block, const NotNull< Block > & block_clicked, BlockFace block_face, const ItemType & bucket, std::optional< ItemStack > item_stack, EquipmentSlot hand) |
|
| const Nullable< Block > & | getBlock () const Gets the block involved in this event. |
| const NotNull< Block > & | getBlockClicked () const Gets the block clicked by the player. |
| BlockFace | getBlockFace () const Gets the face on the clicked block. |
| const ItemType & | getBucket () const Gets the bucket used in this event. |
| EquipmentSlot | getHand () const Gets the hand used in this event. |
| const std::optional< ItemStack > & | getItemStack () const Gets the resulting item in the player's hand. |
| void | setItemStack (std::optional< ItemStack > item_stack) Sets the resulting item in the player's hand. |
| ~PlayerBucketEvent () override |
Public Functions inherited from endstone::Cancellable¶
| Type | Name |
|---|---|
| virtual void | cancel () Cancel this event. |
| virtual bool | isCancelled () override const Gets the cancellation state of this event. |
| virtual void | setCancelled (bool cancel) override Sets the cancellation state of this event. |
Public Functions inherited from endstone::ICancellable¶
| Type | Name |
|---|---|
| virtual void | cancel () = 0 Cancels this event. |
| virtual bool | isCancelled () const = 0 Gets the cancellation state of this event. |
| virtual void | setCancelled (bool cancel) = 0 Sets the cancellation state of this event. |
| virtual | ~ICancellable () = default |
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerBucketEvent¶
inline endstone::PlayerBucketFillEvent::PlayerBucketEvent (
const NotNull < Player > & player,
const Nullable < Block > & block,
const NotNull < Block > & block_clicked,
BlockFace block_face,
const ItemType & bucket,
std::optional< ItemStack > item_stack,
EquipmentSlot hand
)
The documentation for this class was generated from the following file include/endstone/event/player/player_bucket_fill_event.h