Class endstone::Mob¶
Represents a mobile entity (i.e. living entity), such as a monster or player.
#include <endstone/actor/mob.h>
Inherits the following classes: endstone::Actor
Inherited by the following classes: endstone::Player
Public Functions¶
Type | Name |
---|---|
virtual bool | isGliding () const = 0 Checks to see if an actor is gliding, such as using an Elytra. |
Public Functions inherited from endstone::Actor¶
See endstone::Actor
Type | Name |
---|---|
virtual bool | addScoreboardTag (std::string tag) const = 0 Adds a tag to this actor. |
virtual Actor * | asActor () override const Gets a CommandSender asActor . |
virtual Dimension & | getDimension () const = 0 |
virtual int | getHealth () const = 0 Gets the entity's health from 0 to its max possible value, where 0 is dead. |
virtual std::int64_t | getId () const = 0 Returns a unique id for this actor. |
virtual Level & | getLevel () const = 0 |
virtual Location | getLocation () const = 0 |
virtual int | getMaxHealth () const = 0 Gets the maximum health this entity has. |
virtual std::string | getNameTag () const = 0 Gets the current name tag of the actor. |
virtual std::uint64_t | getRuntimeId () const = 0 |
virtual std::string | getScoreTag () const = 0 Gets the current score tag of the actor. |
virtual std::vector< std::string > | getScoreboardTags () const = 0 Returns a list of scoreboard tags for this actor. |
virtual std::string | getType () const = 0 Get the type of the actor. |
virtual Vector< float > | getVelocity () const = 0 |
virtual bool | isDead () const = 0 Returns true if this actor has been marked for removal. |
virtual bool | isInLava () const = 0 |
virtual bool | isInWater () const = 0 |
virtual bool | isNameTagAlwaysVisible () const = 0 Checks if the actor's name tag is always visible. |
virtual bool | isNameTagVisible () const = 0 Checks if the actor's name tag is currently visible. |
virtual bool | isOnGround () const = 0 |
virtual bool | removeScoreboardTag (std::string tag) const = 0 Removes a given tag from this actor. |
virtual Result< void > | setHealth (int health) const = 0 |
virtual void | setNameTag (std::string name) = 0 Sets the name tag for the actor. |
virtual void | setNameTagAlwaysVisible (bool visible) = 0 Sets whether the actor's name tag should always be visible. |
virtual void | setNameTagVisible (bool visible) = 0 Sets if the actor's name tag is visible or not. |
virtual void | setRotation (float yaw, float pitch) = 0 |
virtual void | setScoreTag (std::string score) = 0 Sets the score tag for the actor. |
virtual void | teleport (Location location) = 0 |
virtual void | teleport (Actor & target) = 0 |
Public Functions inherited from endstone::CommandSender¶
Type | Name |
---|---|
virtual Actor * | asActor () const Gets a CommandSender asActor . |
virtual CommandSender * | asCommandSender () override const Casts a Permissible asCommandSender . |
virtual ConsoleCommandSender * | asConsole () const Gets a CommandSender as Console. |
virtual Player * | asPlayer () const Gets a CommandSender asPlayer . |
virtual std::string | getName () const = 0 Gets the name of this command sender. |
virtual Server & | getServer () const = 0 Returns the server instance that this command is running on. |
virtual void | sendErrorMessage (const Message & message) const = 0 Sends this sender a error message. |
void | sendErrorMessage (const fmt::format_string< Args... > format, Args &&... args) const |
virtual void | sendMessage (const Message & message) const = 0 Sends this sender a message. |
void | sendMessage (const fmt::format_string< Args... > format, Args &&... args) const |
Public Functions inherited from endstone::Permissible¶
Type | Name |
---|---|
virtual Result< PermissionAttachment * > | addAttachment (Plugin & plugin, const std::string & name, bool value) = 0 |
virtual Result< PermissionAttachment * > | addAttachment (Plugin & plugin) = 0 |
virtual CommandSender * | asCommandSender () const = 0 Casts a Permissible asCommandSender . |
virtual std::unordered_set< PermissionAttachmentInfo * > | getEffectivePermissions () const = 0 |
virtual bool | hasPermission (std::string name) const = 0 |
virtual bool | hasPermission (const Permission & perm) const = 0 |
virtual bool | isOp () const = 0 Checks if this object is a server operator. |
virtual bool | isPermissionSet (std::string name) const = 0 |
virtual bool | isPermissionSet (const Permission & perm) const = 0 |
virtual void | recalculatePermissions () = 0 |
virtual Result< void > | removeAttachment (PermissionAttachment & attachment) = 0 |
virtual void | setOp (bool value) = 0 Sets the operator status of this object. |
virtual | ~Permissible () = default |
Public Functions Documentation¶
function isGliding¶
Checks to see if an actor is gliding, such as using an Elytra.
Returns:
True if this actor is gliding.
The documentation for this class was generated from the following file include/endstone/actor/mob.h