Class endstone::PlayerBucketActorEvent¶
ClassList > endstone > PlayerBucketActorEvent
Represents an event that is called when a player captures an actor in a bucket.
#include <endstone/event/player/player_bucket_actor_event.h>
Inherits the following classes: endstone::Cancellable
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerBucketActorEvent) |
|
| PlayerBucketActorEvent (const NotNull< Player > & player, const NotNull< Actor > & actor, ItemStack original_bucket, EquipmentSlot hand) |
|
| const NotNull< Actor > & | getActor () const Gets the actor being captured. |
| EquipmentSlot | getHand () const Gets the hand used to capture the actor. |
| const ItemStack & | getOriginalBucket () const Gets the bucket used to capture the actor. |
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 PlayerBucketActorEvent¶
inline endstone::PlayerBucketActorEvent::PlayerBucketActorEvent (
const NotNull < Player > & player,
const NotNull < Actor > & actor,
ItemStack original_bucket,
EquipmentSlot hand
)
function getActor¶
Gets the actor being captured.
Returns:
actor being captured
function getHand¶
Gets the hand used to capture the actor.
Returns:
hand used to capture the actor
function getOriginalBucket¶
Gets the bucket used to capture the actor.
This refers to the bucket clicked with, i.e. a water bucket.
Returns:
bucket used to capture the actor
The documentation for this class was generated from the following file include/endstone/event/player/player_bucket_actor_event.h