Skip to content

Class endstone::AttributeModifier

ClassList > endstone > AttributeModifier

Represents an attribute modifier.

  • #include <endstone/attribute/attribute_modifier.h>

Public Types

Type Name
enum Operation
Operation to be applied.

Public Functions

Type Name
AttributeModifier (std::string name, float amount, Operation operation)
AttributeModifier (std::string name, UUID uuid, float amount, Operation operation)
float getAmount () const
Get the amount by which this modifier will apply the operation.
std::string getName () const
Get the name of this modifier.
Operation getOperation () const
Get the operation this modifier will apply.
UUID getUniqueId () const
Get the unique ID for this modifier.

Public Types Documentation

enum Operation

Operation to be applied.

enum endstone::AttributeModifier::Operation {
    Add,
    MultiplyBase,
    Multiply
};


Public Functions Documentation

function AttributeModifier [½]

inline endstone::AttributeModifier::AttributeModifier (
    std::string name,
    float amount,
    Operation operation
) 

function AttributeModifier [2/2]

inline endstone::AttributeModifier::AttributeModifier (
    std::string name,
    UUID uuid,
    float amount,
    Operation operation
) 

function getAmount

Get the amount by which this modifier will apply the operation.

inline float endstone::AttributeModifier::getAmount () const

Returns:

modification amount


function getName

Get the name of this modifier.

inline std::string endstone::AttributeModifier::getName () const

Returns:

name


function getOperation

Get the operation this modifier will apply.

inline Operation endstone::AttributeModifier::getOperation () const

Returns:

operation


function getUniqueId

Get the unique ID for this modifier.

inline UUID endstone::AttributeModifier::getUniqueId () const

Returns:

unique id



The documentation for this class was generated from the following file include/endstone/attribute/attribute_modifier.h