diff --git a/include/endstone/actor/mob.h b/include/endstone/actor/mob.h index 65d5be399..08e755739 100644 --- a/include/endstone/actor/mob.h +++ b/include/endstone/actor/mob.h @@ -26,6 +26,6 @@ class Mob : public Actor { * @brief Checks to see if an actor is gliding, such as using an Elytra. * @return True if this actor is gliding. */ - virtual bool isGliding() const = 0; + [[nodiscard]] virtual bool isGliding() const = 0; }; } // namespace endstone diff --git a/python/src/endstone/_internal/endstone_python.pyi b/python/src/endstone/_internal/endstone_python.pyi index b8b940f2e..db0dbf1eb 100644 --- a/python/src/endstone/_internal/endstone_python.pyi +++ b/python/src/endstone/_internal/endstone_python.pyi @@ -537,6 +537,11 @@ class Mob(Actor): """ Represents a mobile entity (i.e. living entity), such as a monster or player. """ + @property + def is_gliding(self) -> bool: + """ + Checks to see if an actor is gliding, such as using an Elytra. + """ class Permissible: """ Represents an object that may become a server operator and can be assigned permissions. diff --git a/src/endstone_python/actor.cpp b/src/endstone_python/actor.cpp index 92fa12694..e25ac64bb 100644 --- a/src/endstone_python/actor.cpp +++ b/src/endstone_python/actor.cpp @@ -36,7 +36,8 @@ void init_actor(py::module_ &m, py::class_ &actor) py::return_value_policy::reference); py::class_(m, "Mob", "Represents a mobile entity (i.e. living entity), such as a monster or player.") - .def_property_readonly("is_gliding", &Mob::isGliding, ""); + .def_property_readonly("is_gliding", &Mob::isGliding, + "Checks to see if an actor is gliding, such as using an Elytra."); } } // namespace endstone::detail