Class endstone::PlayerPickupExperienceEvent¶
ClassList > endstone > PlayerPickupExperienceEvent
Called when a player picks up an experience orb. More...
#include <endstone/event/player/player_pickup_experience_event.h>
Inherits the following classes: endstone::Cancellable
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerPickupExperienceEvent) |
|
| PlayerPickupExperienceEvent (const NotNull< Player > & player, int amount) |
|
| int | getAmount () const Gets the amount of experience the orb is worth. |
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 |
Detailed Description¶
Cancelling the event leaves the orb in the world.
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerPickupExperienceEvent¶
inline explicit endstone::PlayerPickupExperienceEvent::PlayerPickupExperienceEvent (
const NotNull < Player > & player,
int amount
)
function getAmount¶
Gets the amount of experience the orb is worth.
Returns:
the experience amount
The documentation for this class was generated from the following file include/endstone/event/player/player_pickup_experience_event.h