Class endstone::PlayerOpenSignEvent¶
ClassList > endstone > PlayerOpenSignEvent
Called when a player begins editing a sign's text. More...
#include <endstone/event/player/player_open_sign_event.h>
Inherits the following classes: endstone::Cancellable
Public Types¶
| Type | Name |
|---|---|
| enum | Cause Represents the cause of the sign opening. |
Public Functions¶
| Type | Name |
|---|---|
| ENDSTONE_EVENT (PlayerOpenSignEvent) |
|
| PlayerOpenSignEvent (const NotNull< Player > & player, const NotNull< Sign > & sign, Sign::Side side, Cause cause) |
|
| Cause | getCause () const Gets the cause of the sign opening. |
| Sign::Side | getSide () const Gets the side of the sign being opened. |
| const NotNull< Sign > & | getSign () const Gets a captured state of the sign involved in this event. |
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 this event stops the sign editing menu from opening.
Public Types Documentation¶
enum Cause¶
Represents the cause of the sign opening.
Public Functions Documentation¶
function ENDSTONE_EVENT¶
function PlayerOpenSignEvent¶
inline endstone::PlayerOpenSignEvent::PlayerOpenSignEvent (
const NotNull < Player > & player,
const NotNull < Sign > & sign,
Sign::Side side,
Cause cause
)
function getCause¶
Gets the cause of the sign opening.
Returns:
the sign opening cause
function getSide¶
Gets the side of the sign being opened.
Returns:
the sign side being opened
function getSign¶
Gets a captured state of the sign involved in this event.
Returns:
the sign being opened
The documentation for this class was generated from the following file include/endstone/event/player/player_open_sign_event.h