Class endstone::PlayerSneakEvent¶
ClassList > endstone > PlayerSneakEvent
Called when a player starts or stops sneaking.
#include <endstone/event/player/player_sneak_event.h>
Inherits the following classes: endstone::PlayerEvent
Public Functions¶
| Type | Name |
|---|---|
| PlayerSneakEvent (Player & player, bool sneaking) |
|
| bool | isSneaking () const Gets whether the player is attempting to sneak. |
Public Functions inherited from endstone::PlayerEvent¶
| Type | Name |
|---|---|
| PlayerEvent (Player & player) |
|
| Player & | getPlayer () const Returns the player involved in this event. |
| ~PlayerEvent () override |
Public Functions inherited from endstone::Event¶
See endstone::Event
| Type | Name |
|---|---|
| Event (bool async=false) |
|
| Event (const Event &) = delete |
|
| Event (Event &&) = default |
|
| virtual std::string | getEventName () const = 0 Gets a user-friendly identifier for this event. |
| bool | isAsynchronous () const Any custom event that should not by synchronized with other events must use the specific constructor. |
| Event & | operator= (const Event &) = delete |
| Event & | operator= (Event &&) = default |
| virtual | ~Event () = default |
Protected Attributes inherited from endstone::PlayerEvent¶
| Type | Name |
|---|---|
| std::reference_wrapper< Player > | player_ |
Public Functions Documentation¶
function PlayerSneakEvent¶
function isSneaking¶
Gets whether the player is attempting to sneak.
Returns:
true when starting to sneak, false when stopping
The documentation for this class was generated from the following file include/endstone/event/player/player_sneak_event.h