Skip to content

Class endstone::ActorToggleSwimEvent

ClassList > endstone > ActorToggleSwimEvent

Called when an Actor 's swimming state is toggled.

  • #include <endstone/event/actor/actor_toggle_swim_event.h>

Inherits the following classes: endstone::ActorEvent

Public Functions

Type Name
ActorToggleSwimEvent (const NotNull< Mob > & actor, bool swimming)
bool isSwimming () const
Returns whether the actor is now swimming or not.

Public Functions inherited from endstone::ActorEvent

See endstone::ActorEvent

Type Name
ActorEvent (const NotNull< ActorType > & actor)
const NotNull< ActorType > & getActor () const
Returns the Actor involved in this event.
const endstone::ActorType & getActorType () const
Returns the type of the Actor involved in this event.
~ActorEvent () 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

Public Functions Documentation

function ActorToggleSwimEvent

inline explicit endstone::ActorToggleSwimEvent::ActorToggleSwimEvent (
    const  NotNull < Mob > & actor,
    bool swimming
) 

function isSwimming

Returns whether the actor is now swimming or not.

inline bool endstone::ActorToggleSwimEvent::isSwimming () const

Returns:

the new swimming state



The documentation for this class was generated from the following file include/endstone/event/actor/actor_toggle_swim_event.h