Skip to content

Class endstone::AttributeModifier

ClassList > endstone > AttributeModifier

Represents an attribute modifier.

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

Public Types

Type Name
enum Operand
Value on which operation to be applied.
enum Operation
Operation to be applied.

Public Functions

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

Public Types Documentation

enum Operand

Value on which operation to be applied.

enum endstone::AttributeModifier::Operand {
    Value,
    MaxValue,
    MinValue
};


enum Operation

Operation to be applied.

enum endstone::AttributeModifier::Operation {
    AddNumber,
    AddScalar,
    MultiplyScalar1
};


Public Functions Documentation

function AttributeModifier [½]

inline endstone::AttributeModifier::AttributeModifier (
    std::string name,
    float amount,
    Operation operation,
    Operand operand=Operand::Value
) 

function AttributeModifier [2/2]

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

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 getOperand

Get the operand this modifier will apply.

inline Operand endstone::AttributeModifier::getOperand () const

Returns:

operand


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